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

WineHQ Bugzilla wine-bugs at winehq.org
Mon Sep 20 11:16:18 CDT 2021


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

--- Comment #8 from Erich E. Hoover <erich.e.hoover at gmail.com> ---
(In reply to Bernhard Übelacker from comment #7)
> I applied following on top of b5e17b66 with the matching staging patchset.
> And 7zFM shows no problem with it when entering the Z: drive.
> 
> 
> @@ -6721,6 +6721,7 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE
> event, PIO_APC_ROUTINE ap
>      {
>          REPARSE_DATA_BUFFER *buffer = (REPARSE_DATA_BUFFER *)out_buffer;
>          status = get_reparse_point( handle, buffer, out_size );
> +        io->Information = buffer->ReparseDataLength +
> FIELD_OFFSET(typeof(*buffer), GenericReparseBuffer);
>          break;
>      }

Wonderful, this particular call stores the size of the buffer in that field, so
the garbage value likely resulted in an insanely large malloc.  I'll rework the
routine to properly hold on to the buffer size (so that this can be done in a
less kludgy way) and get the patch updated.

-- 
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