[Bug 51725] 7-zip 19.0 (up to 21.03) crashes opening Z: or local file system

WineHQ Bugzilla wine-bugs at winehq.org
Tue Sep 14 16:52:39 CDT 2021


https://bugs.winehq.org/show_bug.cgi?id=51725

--- Comment #5 from Bernhard Übelacker <bernhardu at mailbox.org> ---
A short investigation with rr points to these actions:
- DeviceIoControl(FSCTL_GET_REPARSE_POINT) get called for "Z:\\initrd.img"
- This sets "*returned = piosb->Information;"
  Unfortunately piosb->Information seems not to contain valid data.
- And 7-Zip uses the value in returned for a malloc and memcpy
  which produces a segfault.


Following small change seems to make the fault in 7-Zip go away:

@@ -6644,6 +6666,7 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE
event, PIO_APC_ROUTINE ap
     }
     case FSCTL_GET_REPARSE_POINT:
     {
+        io->Information = 0;
         REPARSE_DATA_BUFFER *buffer = (REPARSE_DATA_BUFFER *)out_buffer;
         status = get_reparse_point( handle, buffer, out_size );
         break;

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list