33fb966e56
The overflow protection is broken when the window log is `> (3U << 29)`, so 31. It doesn't work when `current` isn't around `1U << windowLog` ahead of `lowLimit`, and the the assertion `current > newCurrent` fails. This happens when the same context is used many times over, but with a large window log, like in zstdmt. Fix it by triggering correction based on `nextSrc - base` instead of `lowLimit`. The added test fails before the patch, and passes after. |
||
---|---|---|
.. | ||
fse_compress.c | ||
huf_compress_impl.h | ||
huf_compress.c | ||
zstd_compress_impl.h | ||
zstd_compress_internal.h | ||
zstd_compress.c | ||
zstd_double_fast.c | ||
zstd_double_fast.h | ||
zstd_fast.c | ||
zstd_fast.h | ||
zstd_lazy.c | ||
zstd_lazy.h | ||
zstd_ldm.c | ||
zstd_ldm.h | ||
zstd_opt.c | ||
zstd_opt.h | ||
zstdmt_compress.c | ||
zstdmt_compress.h |