mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-04 00:44:19 +01:00
Add tests for out of bound access to arrays
This commit is contained in:
@@ -129,7 +129,7 @@ public class LimboResultSet {
|
||||
}
|
||||
|
||||
final Object[] resultSet = this.lastStepResult.getResult();
|
||||
if (columnIndex > resultSet.length) {
|
||||
if (columnIndex > resultSet.length || columnIndex < 0) {
|
||||
throw new SQLException("columnIndex out of bound");
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,8 @@ public class JDBC4Statement implements Statement {
|
||||
@Override
|
||||
public ResultSet executeQuery(String sql) throws SQLException {
|
||||
ensureOpen();
|
||||
statement = this.withConnectionTimeout(
|
||||
statement =
|
||||
this.withConnectionTimeout(
|
||||
() -> {
|
||||
try {
|
||||
// TODO: if sql is a readOnly query, do we still need the locks?
|
||||
|
||||
Reference in New Issue
Block a user