diff --git a/module/zfs/lz4.c b/module/zfs/lz4.c index 800635b34..75a31bf17 100644 --- a/module/zfs/lz4.c +++ b/module/zfs/lz4.c @@ -541,7 +541,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;