mirror of
https://github.com/facebook/zstd.git
synced 2025-10-04 00:02:33 -04:00
The match length and literal length extra bytes could either by 2 bytes or 3 bytes in version 0.5. All earlier verions were always 3 bytes, and later version didn't have dumps. The bug, introduced by commit 0fd322f812211e653a83492c0c114b933f8b6bc5, was triggered when the last dump was a 2-byte dump, because we didn't separate that case from a 3-byte dump, and thought we were over-reading. I've tested this fix with every zstd version < 1.0.0 on the buggy file, and we are now always successfully decompressing with the right checksum. Fixes #1693.