summaryrefslogtreecommitdiffstats
path: root/lib/lz4.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lz4.c')
-rw-r--r--lib/lz4.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index 5fbc7c7..34587ce 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -1299,6 +1299,7 @@ static size_t LZ4_stream_t_alignment(void)
LZ4_stream_t* LZ4_initStream (void* buffer, size_t size)
{
DEBUGLOG(5, "LZ4_initStream");
+ if (buffer == NULL) return NULL;
if (size < sizeof(LZ4_stream_t)) return NULL;
#ifndef _MSC_VER /* for some reason, Visual fails the aligment test on 32-bit x86 :
it reports an aligment of 8-bytes,