lz4: fix CID 1339838: Null pointer dereference

This commit is contained in:
Boris Faure 2015-11-19 20:55:10 +01:00
parent eae5306942
commit d558930d01
1 changed files with 1 additions and 0 deletions

View File

@ -687,6 +687,7 @@ int LZ4_compress_limitedOutput(const char* source, char* dest, int inputSize, in
void* LZ4_createStream()
{
void* lz4s = ALLOCATOR(4, LZ4_STREAMSIZE_U32);
if (!lz4s) return NULL;
MEM_INIT(lz4s, 0, LZ4_STREAMSIZE);
return lz4s;
}