Skip to content

Swap to liblzma from lzma-rs introduced issue #398

@bart-acc

Description

@bart-acc

Describe the bug
This change made during the swap to liblzma sets a limit to a value (0) that is actually an error in ancient versions (5.2.3 and earlier) and differs from what we did before.
new_lzma_decoder(0) sets the smallest memory limit while before we defaulted to unlimited, if we wanted to do that again we'd have to put a u64::MAX instead of a 0 in new_lzma_decoder(0).

I've hit this problem trying to read a file from an archive, patching zip2 to use u64::MAX fixes that issue and exposes my next problem, an InvalidData error return but that is a story for a different issue (I can actually reproduce that one).

To Reproduce
Steps to reproduce the behavior:
I've been unable to craft an archive I can share that exposes this behavior in the minimal reproducible test case I made. If anyone can try their hand at crafting the right archive then please.

Expected behavior
Sane memory limits to be set, or for them to be configurable.

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

Desktop (please complete the following information):

  • OS: W11 and WSL

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Amazon Q development agentGenerate new features or iterate code based on issue descriptions and comments.LZMAbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions