]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed asan warning
authorYann Collet <yann.collet.73@gmail.com>
Sat, 12 Dec 2015 11:54:48 +0000 (12:54 +0100)
committerYann Collet <yann.collet.73@gmail.com>
Sat, 12 Dec 2015 11:54:48 +0000 (12:54 +0100)
lib/zstd_compress.c

index 11e613882a9dd0c70f11806b47c69113b7cdc3f6..83f85c770f469e2f86b253754a752e1312e20696 100644 (file)
@@ -1034,6 +1034,7 @@ static U32 ZSTD_insertBt1(ZSTD_CCtx* zc, const BYTE* const ip, const U32 mls, co
     const U32 windowLow = zc->lowLimit;
 
     if ( (current-matchIndex == 1)   /* RLE */
+        && (matchIndex > windowLow)
         && (MEM_read64(match) == MEM_read64(ip)) )
     {
         size_t rleLength = ZSTD_count(ip+8, match+8, iend) + 8;