Dictionary size restriction in lzma_alone_dec

  • CyberShadow

    CyberShadow - 2013-03-18

    A user reported an issue with not being able to decompress a file containing a LZMA stream:

    The cause was that the file specifies a dictionary size of 0x0100000A. This value is rejected by lzma_alone_decoder, because apparently it is not a value that LZMA_Alone would create. (See alone_decoder.c, line 87) The same file decompresses fine with the LZMA SDK.

    Note that in my program, I am creating a lzma_alone_decoder directly, as opposed to using auto_decoder.

    I've worked around this by rounding up the dictionary size to a value that alone_decoder would be happy with.

  • Lasse Collin

    Lasse Collin - 2013-03-23

    Thanks for your report. I committed a fix fix. I think it is safe to include it in 5.0.5; it shouldn't break anything since it affects only lzma_alone_decoder(), not lzma_auto_decoder(). xz has its own detection code so xz isn't affected. xz cannot be made too permissive with .lzma files because too many false positives will cause trouble with xz -dcf, which passes unknown files as is to stdout (a similar feature is in gzip).


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks