1
0
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:
Georg Richter
2023-05-02 17:59:18 +02:00
parent f5a4c73df4
commit a3bba4639f

View File

@@ -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])=