d7zip icon indicating copy to clipboard operation
d7zip copied to clipboard

Avoid unhandled Delphi Exceptions crashing the DLL parent process

Open danielmarschall opened this issue 1 year ago • 0 comments

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 avatar May 12 '24 15:05 danielmarschall