projects
/
platform
/
upstream
/
lz4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
995756f
)
Switch ALLOC() to ALLOC_AND_ZERO() to Paper Over Existing Uninitialized Read
author
W. Felix Handte
<w@felixhandte.com>
Tue, 13 Mar 2018 21:47:34 +0000
(17:47 -0400)
committer
W. Felix Handte
<w@felixhandte.com>
Tue, 13 Mar 2018 21:47:34 +0000
(17:47 -0400)
lib/lz4frame.c
patch
|
blob
|
history
diff --git
a/lib/lz4frame.c
b/lib/lz4frame.c
index
87e209f
..
b91cb7c
100644
(file)
--- 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;
} }