Improved bounds and return value checking (oss-fuzz/29329)

This commit is contained in:
Evan Miller
2021-01-07 19:59:45 -05:00
parent 9b5e591905
commit c31daeb2c4
7 changed files with 59 additions and 17 deletions

View File

@@ -1344,7 +1344,10 @@ SQLRETURN SQL_API SQLColumns(
LogStatementError(stmt, "Could not read table '%s'", szTableName);
return SQL_ERROR;
}
mdb_read_columns(table);
if (!mdb_read_columns(table)) {
LogStatementError(stmt, "Could not read columns of table '%s'", szTableName);
return SQL_ERROR;
}
for (j=0; j<table->num_cols; j++) {
col = g_ptr_array_index(table->columns, j);