Fix potential memory corruption with negative memmove() size

This commit is contained in:
Jasper Lievisse Adriaanse 2021-02-26 15:21:20 +01:00
parent 1d58f77818
commit 8301a21773

View File

@ -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;