Skip to content

Handle malformed LZF back references - #85

Merged
cowtowncoder merged 12 commits into
ning:masterfrom
yawkat:handle-malformed-lzf-backrefs-v2
Aug 2, 2026
Merged

Handle malformed LZF back references#85
cowtowncoder merged 12 commits into
ning:masterfrom
yawkat:handle-malformed-lzf-backrefs-v2

Conversation

@yawkat

@yawkat yawkat commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • validate compressed chunk limits before reading back-reference metadata
  • keep the optimized copy paths while reporting malformed chunks as LZFException
  • add regression coverage for safe and optimal decoder paths

Tests

  • ./mvnw -Dtest=TestLZFDecoder test
  • ./mvnw test

yawkat and others added 2 commits July 23, 2026 07:04
Ensure LZF decoders report LZFException when malformed chunks end before back-reference metadata, and add regression coverage for safe and optimal decoder paths.

Co-Authored-By: multicode <multicode@yawk.at>
Simplify the malformed LZF back-reference regression test by inlining the decoder assertions.

Co-Authored-By: multicode <multicode@yawk.at>
Comment thread src/main/java/com/ning/compress/lzf/impl/VanillaChunkDecoder.java
@cowtowncoder

Copy link
Copy Markdown
Member

@yawkat I massaged this a bit; but before merging thought I'd let you have a look if you want. Just LMK if and when to merge. And then can publish a patch release

@cowtowncoder

Copy link
Copy Markdown
Member

@yawkat I assume this is ok -- will merge, publish 1.2.1

@cowtowncoder
cowtowncoder merged commit 3c5b595 into ning:master Aug 2, 2026
5 checks passed
@cowtowncoder

Copy link
Copy Markdown
Member

Publishing 1.2.1 via https://central.sonatype.com.

@yawkat

yawkat commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

sorry, i missed this in a million other notifications 😅

I checked and your changes look fine to me. Thanks!

@cowtowncoder

Copy link
Copy Markdown
Member

No problem, so many things going around. Figured it should be fine. :)

Thank you for post-review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants