Skip to content

_block.LZ4BlockError: Decompression failed: corrupt input or insufficient space in destination buffer #61

@D3vil0p3r

Description

@D3vil0p3r

I am using the latest commit of dissect.util. When I run pytest, I get:

=========================================================================== test session starts ===========================================================================
platform linux – Python 3.12.7, pytest-8.3.3, pluggy-1.5.0
rootdir: /tmp/makepkg/python-dissect.util/src/dissect.util
configfile: pyproject.toml
plugins: typeguard-4.3.0, libtmux-0.37.0, anyio-4.4.0
collected 94 items                                                                                                                                                        

tests/test_compression.py F........                                                                                                                                 [  9%]
tests/test_cpio.py ......                                                                                                                                           [ 15%]
tests/test_crc32c.py ........                                                                                                                                       [ 24%]
tests/test_feature.py ..                                                                                                                                            [ 26%]
tests/test_plist.py .                                                                                                                                               [ 27%]
tests/test_sid.py .......                                                                                                                                           [ 35%]
tests/test_stream.py .........                                                                                                                                      [ 44%]
tests/test_ts.py ..................................................                                                                                                 [ 97%]
tests/test_xmemoryview.py ..                                                                                                                                        [100%]

================================================================================ FAILURES =================================================================================
___________________________________________________________________________ test_lz4_decompress ___________________________________________________________________________

    def test_lz4_decompress() -> None:
>       assert (
            lz4.decompress(b"\xff\x0cLZ4 compression test string\x1b\x00\xdbPtring") == b"LZ4 compression test string" \* 10
        )
E       _block.LZ4BlockError: Decompression failed: corrupt input or insufficient space in destination buffer. Error code: 7

tests/test_compression.py:11: LZ4BlockError
========================================================================= short test summary info =========================================================================
FAILED tests/test_compression.py::test_lz4_decompress - _block.LZ4BlockError: Decompression failed: corrupt input or insufficient space in destination buffer. Error code: 7
====================================================================== 1 failed, 93 passed in 0.74s =======================================================================

How can I fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions