You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-07 02:42:49 +03:00
CONC-619: NULL pointer dereference in unpack_fields
Fixed NULL pointer dereference, thanks to Yury Chaikou which reported this issue.
This commit is contained in:
@@ -891,7 +891,7 @@ unpack_fields(const MYSQL *mysql,
|
||||
for (i=0; i < field_count; i++)
|
||||
{
|
||||
uint length= (uint)(row->data[i+1] - row->data[i] - 1);
|
||||
if (!row->data[i] && row->data[i][length])
|
||||
if (!row->data[i] || row->data[i][length])
|
||||
goto error;
|
||||
|
||||
*(char **)(((char *)field) + rset_field_offsets[i*2])=
|
||||
|
Reference in New Issue
Block a user