Skip to content

No error thrown when there is garbage data past end-of-frame #181

@embg

Description

@embg

On 0.17.0, the following example doesn't throw an error:

>>> zstandard.decompress(zstandard.compress(b"foo") + b"garbage")
b'foo'

Perhaps debatable, but I think an error should always be thrown if there is data past the last valid frame in a stream. Especially after fixing #59, I don't think it makes sense to silently ignore the garbage past end-of-frame. Users should be notified if they are constructing invalid streams.

Thanks @thatch for identifying this issue.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions