Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
archive_viewer: implement full front-to-back file scan & fix crash on…
… exit (#5554) * archive: CArchiveReader: implement full back-to-front file search for MAGIC Allow archive-viewer to open binaries with more than 4096 bytes of additional data past the appended package (e.g., macOS binaries with code signature). * cliutils: archive_viewer: fix crash when quitting or moving up a level Calling arch.lib.close() when cleaning up the archive when either moving up a level or quitting the archive_viewer application triggers the assert in pyimod02_archive.ArchiveFile.__getattr__. This is because local file object is set only between __enter__ and __exit__ calls, i.e., while in the `with arch.lib:` block. Which also means that there's no need for attempting to close those file handles in the first place, and the error is probably a regression from when the thread-local file objects were introduced.
- Loading branch information
Showing
4 changed files
with
33 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
``CArchiveReader`` now performs full back-to-front file search for | ||
``MAGIC``, allowing ``pyi-archive_viewer`` to open binaries with extra | ||
appended data after embedded package (e.g., digital signature). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Fix a crash in ``pyi-archive_viewer`` when quitting the application or | ||
moving up a level. |