]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed overlapLog==0 => no overlap 527/head
authorYann Collet <cyan@fb.com>
Mon, 30 Jan 2017 22:54:46 +0000 (14:54 -0800)
committerYann Collet <cyan@fb.com>
Mon, 30 Jan 2017 22:54:46 +0000 (14:54 -0800)
lib/compress/zstdmt_compress.c

index d122d829589f954830586a8fc967ca89bef02c72..6e63e880116bb809cfd1eec685b9d478981b75ca 100644 (file)
@@ -514,7 +514,7 @@ static size_t ZSTDMT_initCStream_internal(ZSTDMT_CCtx* zcs,
             if (zcs->cdict == NULL) return ERROR(memory_allocation);
     }   }
     zcs->frameContentSize = pledgedSrcSize;
-    zcs->targetDictSize = (size_t)1 << (zcs->params.cParams.windowLog - zcs->overlapRLog);
+    zcs->targetDictSize = (zcs->overlapRLog>=9) ? 0 : (size_t)1 << (zcs->params.cParams.windowLog - zcs->overlapRLog);
     DEBUGLOG(4, "overlapRLog : %u ", zcs->overlapRLog);
     DEBUGLOG(3, "overlap Size : %u KB", (U32)(zcs->targetDictSize>>10));
     zcs->targetSectionSize = zcs->sectionSize ? zcs->sectionSize : (size_t)1 << (zcs->params.cParams.windowLog + 2);