diff --git a/C/lz4/lz4.c b/C/lz4/lz4.c index 9f5e9bfa..eac0541b 100644 --- a/C/lz4/lz4.c +++ b/C/lz4/lz4.c @@ -1749,7 +1749,7 @@ LZ4_decompress_generic( const size_t dictSize /* note : = 0 if noDict */ ) { - if (src == NULL) { return -1; } + if ((src == NULL) || (outputSize < 0)) { return -1; } { const BYTE* ip = (const BYTE*) src; const BYTE* const iend = ip + srcSize;