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

Avoid unhandled Delphi Exceptions crashing the DLL parent process #9

Merged
merged 1 commit into from
Sep 7, 2024

Conversation

danielmarschall
Copy link
Contributor

How to reproduce?

Try to 7z a folder where a file cannot be read, e.g. because it is in exclusive access by another process.

7z.dll will call the Delphi callback(s) which will throw an unhandled Delphi Exception. The DLL will raise an internal Exception 0x0eedfade which will crash the parent process (which is ironically the same Delphi process) without any possibility of recovery.

This patch changes the unhandled Delphi Exception into a HRESULT error which is correctly handled by the DLL.

danielmarschall added a commit to danielmarschall/d7zip that referenced this pull request May 13, 2024
Extended by Daniel Marschall, 13 May 2024
- geoffsmith82#8 : Fix Range Check Exception in RINOK()
- geoffsmith82#9 : Avoid unhandled Delphi Exceptions crashing the DLL parent process
- Implemented packing and unpacking of empty directories and hidden files  (currently, no pull request sent)
- Implemented restoring of the file attributes and modification times  (currently, no pull request sent)
@geoffsmith82 geoffsmith82 merged commit 97d1ced into geoffsmith82:master Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants