You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Fix for CONC-762: Always set is_null and length in bind structure to avoid
msan errors
This commit is contained in:
@@ -414,6 +414,9 @@ int mthd_stmt_fetch_to_bind(MYSQL_STMT *stmt, unsigned char *row)
|
||||
stmt->bind[i].is_null= &stmt->bind[i].is_null_value;
|
||||
*stmt->bind[i].is_null= 1;
|
||||
stmt->bind[i].u.row_ptr= NULL;
|
||||
if (!stmt->bind[i].length)
|
||||
stmt->bind[i].length= &stmt->bind[i].length_value;
|
||||
*stmt->bind[i].length= stmt->bind[i].length_value= 0;
|
||||
}
|
||||
} else
|
||||
{
|
||||
@@ -426,6 +429,9 @@ int mthd_stmt_fetch_to_bind(MYSQL_STMT *stmt, unsigned char *row)
|
||||
if (stmt->result_callback)
|
||||
stmt->result_callback(stmt->user_data, i, &row);
|
||||
else {
|
||||
if (!stmt->bind[i].is_null)
|
||||
stmt->bind[i].is_null= &stmt->bind[i].is_null_value;
|
||||
*stmt->bind[i].is_null= 0;
|
||||
if (mysql_ps_fetch_functions[stmt->fields[i].type].pack_len >= 0)
|
||||
length= mysql_ps_fetch_functions[stmt->fields[i].type].pack_len;
|
||||
else
|
||||
|
Reference in New Issue
Block a user