From 06e041cfa22a34ac65697e05bea9d619ff49d4a7 Mon Sep 17 00:00:00 2001 From: Pavol Sloboda Date: Mon, 26 May 2025 12:15:01 +0200 Subject: [PATCH] Added the FAIL_UNLESS call for the bind variable that is being allocated to handle the possibility of the calloc failing and ensure we are not working with NULL in the rest of the tests --- unittest/libmariadb/ps_bugs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/unittest/libmariadb/ps_bugs.c b/unittest/libmariadb/ps_bugs.c index 6284f6dc..52908729 100644 --- a/unittest/libmariadb/ps_bugs.c +++ b/unittest/libmariadb/ps_bugs.c @@ -5164,6 +5164,7 @@ static int test_maxparam(MYSQL *mysql) MYSQL_BIND* bind; bind = calloc(65535, sizeof *bind); + FAIL_UNLESS(bind, "Not enough memory"); rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); check_mysql_rc(rc, mysql);