From c5ecc0493dfb73ab7b4d44312487398316f093e4 Mon Sep 17 00:00:00 2001 From: bol-van Date: Fri, 6 Feb 2026 11:05:54 +0300 Subject: [PATCH] nfqws2: check malloc result --- nfq2/nfqws.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nfq2/nfqws.c b/nfq2/nfqws.c index 23397d8..657b93e 100644 --- a/nfq2/nfqws.c +++ b/nfq2/nfqws.c @@ -170,7 +170,7 @@ static void fuzzPacketData(unsigned int count) if (bQuit) break; if (!(k%1000)) DLOG_CONDUP("fuzz ct=%u\n",k); len = random()%(FUZZ_MAX_PACKET_SIZE+1); - packet = malloc(len); // alloc every time to catch uninitialized reads + if (!(packet = malloc(len))) return; // alloc every time to catch uninitialized reads fill_random_bytes(packet,len); if (len) {