diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile | 1 | ||||
-rw-r--r-- | lib/lz4.c | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/Makefile b/lib/Makefile index d6a8625..bb45582 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -186,6 +186,7 @@ uninstall: @$(RM) $(DESTDIR)$(INCLUDEDIR)/lz4.h @$(RM) $(DESTDIR)$(INCLUDEDIR)/lz4hc.h @$(RM) $(DESTDIR)$(INCLUDEDIR)/lz4frame.h + @$(RM) $(DESTDIR)$(INCLUDEDIR)/lz4frame_static.h @echo lz4 libraries successfully uninstalled endif @@ -1542,9 +1542,11 @@ LZ4_FORCE_INLINE int LZ4_decompress_generic( * this shortcut was tested on x86 and x64, where it improves decoding speed. * it has not yet been benchmarked on ARM, Power, mips, etc. * NOTE: The loop begins with a read, so we must have one byte left at the end. */ - if (((ip + 14 /*maxLL*/ + 2 /*offset*/ < iend) - & (op + 14 /*maxLL*/ + 18 /*maxML*/ <= oend)) - & ((token < (15<<ML_BITS)) & ((token & ML_MASK) != 15)) ) { + if (endOnInput + && ((ip + 14 /*maxLL*/ + 2 /*offset*/ < iend) + & (op + 14 /*maxLL*/ + 18 /*maxML*/ <= oend) + & (token < (15<<ML_BITS)) + & ((token & ML_MASK) != 15) ) ) { size_t const ll = token >> ML_BITS; size_t const off = LZ4_readLE16(ip+ll); const BYTE* const matchPtr = op + ll - off; /* pointer underflow risk ? */ |