Skip to content

Commit

Permalink
CONC-619: NULL pointer dereference in unpack_fields
Browse files Browse the repository at this point in the history
Fixed NULL pointer dereference, thanks to Yury Chaikou which
reported this issue.
  • Loading branch information
9EOR9 committed May 2, 2023
1 parent f5a4c73 commit a3bba46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libmariadb/mariadb_lib.c
Expand Up @@ -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])=
Expand Down

0 comments on commit a3bba46

Please sign in to comment.