Skip to content

Commit a3bba46

Browse files
committed
CONC-619: NULL pointer dereference in unpack_fields
Fixed NULL pointer dereference, thanks to Yury Chaikou which reported this issue.
1 parent f5a4c73 commit a3bba46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libmariadb/mariadb_lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ unpack_fields(const MYSQL *mysql,
891891
for (i=0; i < field_count; i++)
892892
{
893893
uint length= (uint)(row->data[i+1] - row->data[i] - 1);
894-
if (!row->data[i] && row->data[i][length])
894+
if (!row->data[i] || row->data[i][length])
895895
goto error;
896896

897897
*(char **)(((char *)field) + rset_field_offsets[i*2])=

0 commit comments

Comments
 (0)