lz4: fix CID 1339839: Null pointer dereference

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

View File

@ -1195,6 +1195,7 @@ int LZ4_resetStreamState(void* state, const char* inputBuffer)
void* LZ4_create (const char* inputBuffer)
{
void* lz4ds = ALLOCATOR(4, LZ4_STREAMSIZE_U32);
if (!lz4ds) return NULL;
LZ4_init ((LZ4_stream_t_internal*)lz4ds, (const BYTE*)inputBuffer);
return lz4ds;
}