mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
When TAbUserAbort propagates out of TAbTarArchive.SaveArchive (e.g. from the abort check added to the save loop), it exits the IsGzippedTar branch of TAbGzipArchive.SaveArchive without calling SwapToGzip. The outer finally block then compares FStream (which equals FTarStream, possibly nil) with NewStream (FGzStream) and incorrectly frees NewStream. The destructor later calls SwapToGzip (restoring FStream to the already-freed FGzStream) and then frees FStream a second time, causing an access violation. Fix: compare FGzStream instead of FStream in the finally condition. FGzStream always holds the original gzip stream reference and is never changed by SwapToTar/SwapToGzip, so the NewStream ownership check is correct regardless of which swap state the archive is in. |
||
|---|---|---|
| .. | ||
| dsx | ||
| wcx | ||
| wdx | ||
| wfx | ||
| wlx | ||
| build.bat | ||
| build.sh | ||