diff options
author | W. Felix Handte <w@felixhandte.com> | 2018-03-13 21:47:34 (GMT) |
---|---|---|
committer | W. Felix Handte <w@felixhandte.com> | 2018-03-13 21:47:34 (GMT) |
commit | c852f20c39e877b877da49dea52dd4e36a5d6cb9 (patch) | |
tree | 2586b6b6025ddc627454b640a7e713c40862c405 /lib/lz4frame.c | |
parent | 995756f218e4f144953ca4dfc8df37493e8f775b (diff) | |
download | lz4-c852f20c39e877b877da49dea52dd4e36a5d6cb9.zip lz4-c852f20c39e877b877da49dea52dd4e36a5d6cb9.tar.gz lz4-c852f20c39e877b877da49dea52dd4e36a5d6cb9.tar.bz2 |
Switch ALLOC() to ALLOC_AND_ZERO() to Paper Over Existing Uninitialized Read
Diffstat (limited to 'lib/lz4frame.c')
-rw-r--r-- | lib/lz4frame.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lz4frame.c b/lib/lz4frame.c index 87e209f..b91cb7c 100644 --- a/lib/lz4frame.c +++ b/lib/lz4frame.c @@ -605,7 +605,7 @@ size_t LZ4F_compressBegin_usingCDict(LZ4F_cctx* cctxPtr, if (cctxPtr->maxBufferSize < requiredBuffSize) { cctxPtr->maxBufferSize = 0; FREEMEM(cctxPtr->tmpBuff); - cctxPtr->tmpBuff = (BYTE*)ALLOC(requiredBuffSize); + cctxPtr->tmpBuff = (BYTE*)ALLOC_AND_ZERO(requiredBuffSize); if (cctxPtr->tmpBuff == NULL) return err0r(LZ4F_ERROR_allocation_failed); cctxPtr->maxBufferSize = requiredBuffSize; } } |