diff options
author | Yann Collet <Cyan4973@users.noreply.github.com> | 2021-04-30 15:56:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-30 15:56:25 (GMT) |
commit | 7a966c1511816b53ac93aa2f2a2ff97e036a4a60 (patch) | |
tree | 86edd8624abe303b38fd654a7dfc14a7b2a406ca /lib | |
parent | 7d8d1075e696d585238e6aa6a4f43dc759da250e (diff) | |
parent | 8301a21773ef61656225e264f4f06ae14462bca7 (diff) | |
download | lz4-7a966c1511816b53ac93aa2f2a2ff97e036a4a60.zip lz4-7a966c1511816b53ac93aa2f2a2ff97e036a4a60.tar.gz lz4-7a966c1511816b53ac93aa2f2a2ff97e036a4a60.tar.bz2 |
Merge pull request #972 from jasperla/memmove_crash
Fix potential memory corruption with negative memmove() size
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lz4.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |