Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
This repository was archived by the owner on May 20, 2025. It is now read-only.

Bug in lznt1.py causes infinite loop #42

@crankyflamingo

Description

@crankyflamingo

Came across an xshell sample that caused the LZNT1 compression to infinitely loop.
In the below code, len(tmp) was 0.
(line 85 ish)

if length >= bp:
    tmp = u[-bp:]
    while length >= len(tmp):
        u += tmp
        length -= len(tmp)
        if not len(tmp):  <- added in fixes the issue.
            break

    u += tmp[:length]

Thanks.

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