From a3bba4639f55148c59a28a506df8a2b88e5e83ab Mon Sep 17 00:00:00 2001 From: Georg Richter Date: Tue, 2 May 2023 17:59:18 +0200 Subject: [PATCH] CONC-619: NULL pointer dereference in unpack_fields Fixed NULL pointer dereference, thanks to Yury Chaikou which reported this issue. --- libmariadb/mariadb_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmariadb/mariadb_lib.c b/libmariadb/mariadb_lib.c index 59fa526e4..d31f33abd 100644 --- a/libmariadb/mariadb_lib.c +++ b/libmariadb/mariadb_lib.c @@ -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])=