diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lz4.c | 2 | ||||
-rw-r--r-- | lib/lz4hc.c | 1 |
2 files changed, 2 insertions, 1 deletions
@@ -541,7 +541,7 @@ static int LZ4_compress_generic( break; } if ((tableType == byU16) && (inputSize>=LZ4_64Klimit)) return 0; /* Size too large (not within 64K limit) */ - if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ + if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ /* First Byte */ LZ4_putPosition(ip, ctx, tableType, base); diff --git a/lib/lz4hc.c b/lib/lz4hc.c index 45f1208..ef3997b 100644 --- a/lib/lz4hc.c +++ b/lib/lz4hc.c @@ -693,6 +693,7 @@ int LZ4_saveDictHC (LZ4_streamHC_t* LZ4_streamHCPtr, char* safeBuffer, int dictS streamPtr->base = streamPtr->end - endIndex; streamPtr->dictLimit = endIndex - dictSize; streamPtr->lowLimit = endIndex - dictSize; + if (streamPtr->nextToUpdate < streamPtr->dictLimit) streamPtr->nextToUpdate = streamPtr->dictLimit; } return dictSize; } |