]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed risk of segfault on very large files (multiple GB)
authorYann Collet <yann.collet.73@gmail.com>
Sat, 2 Jul 2016 19:39:47 +0000 (21:39 +0200)
committerYann Collet <yann.collet.73@gmail.com>
Sat, 2 Jul 2016 19:39:47 +0000 (21:39 +0200)
lib/compress/zstd_compress.c

index 07d8802211c2ef03da97104ac0a26807b0b9075b..4cb92c076bac4e0922a5e0f31d47f7fdeea472e2 100644 (file)
@@ -404,6 +404,8 @@ static void ZSTD_reduceIndex (ZSTD_CCtx* zc, const U32 reducerValue)
 
     { const U32 h3Size = (zc->hashLog3) ? 1 << zc->hashLog3 : 0;
       ZSTD_reduceTable(zc->hashTable3, h3Size, reducerValue); }
+
+     ZSTD_reduceTable(zc->rep, ZSTD_REP_NUM, reducerValue);
 }