d7zip
d7zip copied to clipboard
Avoid unhandled Delphi Exceptions crashing the DLL parent process
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.