Skip to content

Fails to lzma2_decompress data larger than 16MB #2

@corwin-of-amber

Description

@corwin-of-amber

I am submitting this issue mostly for posterity in case someone else encounters the same problem in the near future. Perhaps I will be able to fix it at some point.

I have tried decompressing a binary stream (tar) whose compressed size is 11MB and uncompressed size 42MB. I am getting 'corrupt data'. Some superficial debugging shows that this occurs at precisely the point in the execution where the output buffer size (this$static.d.output.buf) is 16777216 (= 1 << 24). It also happens that the value of rep0 computed at this line:

this$static.rep0 = (2 | posSlot & 1) << numDirectBits;

is -2147483648 (= 1 << 31).

So it looks like a case of integer overflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions