summaryrefslogtreecommitdiff
path: root/src/commonlib/bsd/lz4.c.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/commonlib/bsd/lz4.c.inc')
-rw-r--r--src/commonlib/bsd/lz4.c.inc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/commonlib/bsd/lz4.c.inc b/src/commonlib/bsd/lz4.c.inc
index b3be4e5b44..8c75e2f279 100644
--- a/src/commonlib/bsd/lz4.c.inc
+++ b/src/commonlib/bsd/lz4.c.inc
@@ -150,6 +150,7 @@ FORCE_INLINE int LZ4_decompress_generic(
if ((length=(token>>ML_BITS)) == RUN_MASK)
{
unsigned s;
+ if ((endOnInput) && unlikely(ip>=iend-RUN_MASK)) goto _output_error; /* overflow detection */
do
{
s = *ip++;