[PATCH] server: zero allocated memory after allocating mappings

Jefferson Carpenter jeffersoncarpenter2 at gmail.com
Mon Apr 29 00:04:51 CDT 2019


See attached patch for one way to fix this.  A macro is used to
iterate over all of the struct's members, and it is used both to
define the struct, and to pack it into a BLOB (and to un-pack it (not
shown)).  Patch not suggested for merge.

Is this the kind of thing you're interested in?

- Jefferson

On Sun, Apr 28, 2019 at 7:44 PM Alexandre Julliard <julliard at winehq.org> wrote:
>
> Jefferson Carpenter <jeffersoncarpenter2 at gmail.com> writes:
>
> > From 12fe924328dd2317741db9db28cb9a2ad03a8692 Mon Sep 17 00:00:00 2001
> > From: Jefferson Carpenter <jeffersoncarpenter2 at gmail.com>
> > Date: Sat, 27 Apr 2019 07:33:59 +0000
> > Subject: [PATCH] server: zero allocated memory after allocating mappings
> >
> > An uninitialized read occurs in the send_reply function, after
> > get_mapping_info calls set_reply_data( &mapping->image, &c..
>
> Please try to figure out which field is not initialized and set it to a
> correct value, instead of hiding the problem by zeroing everything.
>
> --
> Alexandre Julliard
> julliard at winehq.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-declare-pe_image_info_t-using-a-macro-pack-members-w.patch
Type: text/x-patch
Size: 4128 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20190429/cc6d249b/attachment.bin>


More information about the wine-devel mailing list