Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clp: Infinite loop when compressing zip archive. #389

Open
LinZhihao-723 opened this issue May 10, 2024 · 1 comment
Open

clp: Infinite loop when compressing zip archive. #389

LinZhihao-723 opened this issue May 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@LinZhihao-723
Copy link
Member

Bug

An infinite loop is detected when compressing a zip archive that contains Android logs. By looking into the execution flow, it turns out that it gets stuck in this infinite loop: https://github.com/y-scope/clp/blob/v0.1.0/components/core/src/clp/LibarchiveFileReader.cpp#L38. This is because the current code doesn't handle the case where the data block in the LibArchiveFileReader has a length of 0.

CLP version

v0.1.0

Environment

macOS 14.2
ubuntu Linux

Reproduction steps

The zip archive causing this bug contains private data so we can't upload it here. A zip file containing a 0-length data block will be required for reproduction.

@LinZhihao-723 LinZhihao-723 added the bug Something isn't working label May 10, 2024
@LinZhihao-723
Copy link
Member Author

The bug can be reproduced by compressing the following empty archive using clp:
emptyFile.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant