Skip to content

No check if Reserved of Symbol_Compression_Modes is 0 #3821

@aimuz

Description

@aimuz

Describe the bug

According to the https://datatracker.ietf.org/doc/html/rfc8878#name-symbol_compression_modes description, Reserved should have to be 0, in which case the following file should not be able to be extracted

test-diverge-855c1b40.zst.zip

Using educational_decoder gives the expected error, but using the zstd binary does not.

use educational_decoder

./harness test-diverge-855c1b40.zst test-diverge-855c1b40
Error: Corruption detected while decompressing

use zstd

zstd -d test-diverge-855c1b40.zst
test-diverge-855c1b40.zst: 102400 bytes

To Reproduce
Steps to reproduce the behavior:

  1. Downloads data '...'
  2. Run '...' with flags '...'
  3. Scroll up on the log to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots and charts
If applicable, add screenshots and charts to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Mac] Mac
  • Version [e.g. 22] *** Zstandard CLI (64-bit) v1.5.5, by Yann Collet ***
  • Compiler [e.g. gcc]
  • Flags [e.g. O2]
  • Other relevant hardware specs [e.g. Dual-core]
  • Build system [e.g. Makefile]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions