diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lz4hc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/lz4hc.c b/lib/lz4hc.c index 059c4b5..b89983f 100644 --- a/lib/lz4hc.c +++ b/lib/lz4hc.c @@ -327,7 +327,8 @@ LZ4HC_InsertAndGetWiderMatch ( if (lookBackLength==0) { /* no back possible */ size_t const maxML = MIN(currentSegmentLength, srcPatternLength); if ((size_t)longest < maxML) { - longest = maxML; + assert(maxML < 2 GB); + longest = (int)maxML; *matchpos = base + matchIndex; /* virtual pos, relative to ip, to retrieve offset */ *startpos = ip; } |