diff options
author | yann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd> | 2013-10-21 08:03:40 (GMT) |
---|---|---|
committer | yann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd> | 2013-10-21 08:03:40 (GMT) |
commit | a78db582d321446b5167de67eec8ba3239b14bbe (patch) | |
tree | 394401dcd266164afdaf8e8462d81614c79d517d /lz4.c | |
parent | 82bf5be9b0e4e5bd3dbdae4ec2aaa9fe8fc693fb (diff) | |
download | lz4-a78db582d321446b5167de67eec8ba3239b14bbe.zip lz4-a78db582d321446b5167de67eec8ba3239b14bbe.tar.gz lz4-a78db582d321446b5167de67eec8ba3239b14bbe.tar.bz2 |
Makefile : support DESTDIR for staged installs. Thanks Jorge Aparicio.
Makefile : make install installs both lz4 and lz4c (Jorge Aparicio)
Makefile : removed -Wno-implicit-declaration compilation switch
lz4cli.c : include <stduni.h> for isatty() (Luca Barbato)
lz4.h : introduced LZ4_MAX_INPUT_SIZE constant (Shay Green)
lz4.h : LZ4_compressBound() : unified macro and inline definitions (Shay Green)
lz4.h : LZ4_decompressSafe_partial() : clarify comments (Shay Green)
lz4.c : LZ4_compress() verify input size condition (Shay Green)
bench.c : corrected a bug in free memory size evaluation
cmake : install into bin/ directory (Richard Yao)
cmake : check for just C compiler (Elan Ruusamae)
git-svn-id: https://lz4.googlecode.com/svn/trunk@107 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
Diffstat (limited to 'lz4.c')
-rw-r--r-- | lz4.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -430,6 +430,7 @@ FORCE_INLINE int LZ4_compress_generic( U32 forwardH;
// Init conditions
+ if ((U32)inputSize > (U32)LZ4_MAX_INPUT_SIZE) return 0; // Unsupported input size, too large (or negative)
if ((prefix==withPrefix) && (ip != ((LZ4_Data_Structure*)ctx)->nextBlock)) return 0; // must continue from end of previous block
if (prefix==withPrefix) ((LZ4_Data_Structure*)ctx)->nextBlock=iend; // do it now, due to potential early exit
if ((tableType == byU16) && (inputSize>=LZ4_64KLIMIT)) return 0; // Size too large (not within 64K limit)
|