From 04089d1e11321f89de4bd6cde36926677c791ed8 Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Thu, 19 Nov 2015 20:58:17 +0100 Subject: [PATCH] lz4: fix CID 1339837: Null pointer dereference --- src/bin/lz4/lz4.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/lz4/lz4.c b/src/bin/lz4/lz4.c index 73f1d955..b3062f04 100644 --- a/src/bin/lz4/lz4.c +++ b/src/bin/lz4/lz4.c @@ -1078,6 +1078,7 @@ typedef struct void* LZ4_createStreamDecode() { void* lz4s = ALLOCATOR(sizeof(U32), LZ4_STREAMDECODESIZE_U32); + if (!lz4s) return NULL; MEM_INIT(lz4s, 0, LZ4_STREAMDECODESIZE); return lz4s; }