Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compress/bzip2: Reader behavior diverges from C library #18516

Open
dsnet opened this issue Jan 4, 2017 · 0 comments
Open

compress/bzip2: Reader behavior diverges from C library #18516

dsnet opened this issue Jan 4, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@dsnet
Copy link
Member

@dsnet dsnet commented Jan 4, 2017

A review of the standard library implementation and the C implementation reveals the following divergent behaviors:

  • Reader does not reject missing terminating repeator value in RLE1 stage.
    Reproducer:
    425a6831314159265359e16e6571000001840020002000211846e0bb9229c284870b732b88
  • Reader chokes in RLE1 stage with suboptimal use of repeater codes:
    Reproducer:
    425a6831314159265359f59a903a000004c40040002000200020a9a082138bb9229c28487acd481d00
  • Reader chokes when given an under-subscribed prefix tree. Unlike DEFLATE, the bzip2 format does not "require" that prefix trees be canonical and complete. This issue is harder to fix without using the exact same prefix implementation as the C library (as most other language ports do).
    Reproducer:
    425a683131415926535958fdd3b000000008007fe02000228630100300797bed2c7a82ee48a70a120b1fba7600

C version used: bzip2-1.0.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant