ugrep: random crash and hang in option --zmax>1 when nested jar has a decompression error
Given the following folder structure, ugrep may segmentation fault or deadlock when using with -z and -r arg.
--root folder (pwd)
|-- a.jar
|-- b.jar (within a.jar)
|-- b.jar
when decompress the jar file, following warning log indicated there are potential rc:
ugrep: warning: cannot decompress b.jar: a zlib decompression error was detected in the zip compressed data ugrep: warning: cannot decompress b.jar: EOF detected in the zip compressed data
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Comments: 16 (11 by maintainers)
Commits related to this issue
- Fixes #313 fix segfault and hang when zlib inflate ret value is below 0 — committed to mmyjona/ugrep by deleted user 8 months ago
- nested zip error recovery #313 — committed to Genivia/ugrep by genivia-inc 8 months ago
- nested zip error recovery #313 redux — committed to Genivia/ugrep by genivia-inc 8 months ago
- released 4.3.3 - added brotli compressed files search #312 - added bzip3 compressed files search #311 - updated option --pretty to accept a WHEN argument 'never', 'always', 'auto' - improved TUI scre... — committed to Genivia/ugrep by genivia-inc 8 months ago
- Merge tag 'v4.5.2' # By Robert van Engelen (55) and others # Via GitHub (16) and Robert van Engelen (2) * tag 'v4.5.2': released 4.5.2 tests: Fix tests with 7zip disabled 7zip: Do not build whe... — committed to stdedos/ugrep by deleted user 5 months ago
I found where it hung:
the write call never return.