diff options
author | Jasper Lievisse Adriaanse <j@jasper.la> | 2021-02-26 14:21:20 (GMT) |
---|---|---|
committer | Jasper Lievisse Adriaanse <j@jasper.la> | 2021-02-26 14:21:20 (GMT) |
commit | 8301a21773ef61656225e264f4f06ae14462bca7 (patch) | |
tree | 3139bbf7dded87390d9903539b2f917bf1371642 /lib | |
parent | 1d58f77818f2ac8c18e89a884826c9fa8acba295 (diff) | |
download | lz4-8301a21773ef61656225e264f4f06ae14462bca7.zip lz4-8301a21773ef61656225e264f4f06ae14462bca7.tar.gz lz4-8301a21773ef61656225e264f4f06ae14462bca7.tar.bz2 |
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; |