mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-03-10 00:20:54 +08:00
Bounds check mdb_sql_bind_column()
Return -1 if the bounds check fails, otherwise the result of mdb_bind_column_by_name. Update other places in the code to check the return value.
This commit is contained in:
@@ -1037,11 +1037,8 @@ bind_columns(struct _hstmt *stmt)
|
||||
if (stmt->rows_affected==0) {
|
||||
cur = stmt->bind_head;
|
||||
while (cur) {
|
||||
if (cur->column_number>0 &&
|
||||
cur->column_number <= stmt->sql->num_columns) {
|
||||
mdb_sql_bind_column(stmt->sql, cur->column_number,
|
||||
cur->varaddr, cur->column_lenbind);
|
||||
} else {
|
||||
if (mdb_sql_bind_column(stmt->sql, cur->column_number,
|
||||
cur->varaddr, cur->column_lenbind) == -1) {
|
||||
/* log error ? */
|
||||
}
|
||||
cur = cur->next;
|
||||
|
||||
Reference in New Issue
Block a user