[PATCH 1/4] dlls/ntdll: Add handle count to NtQuerySystemInformation

Austin Lund austin.lund at gmail.com
Mon Jun 20 22:36:02 CDT 2011

On 20 June 2011 23:52, Vitaliy Margolen <wine-devel at kievinfo.com> wrote:

>> +            SERVER_START_REQ( create_snapshot )
> You not checking if this call succeeded or not.

I've tried to include all the checks in the new patch.

>> +                while (sizeof(ULONG) +
>> sizeof(SYSTEM_HANDLE_ENTRY)*shi->Count >= len)
> You don't need a loop to calculate new size.

I've done this a different way in the new patch which avoids the reallocs.

> You leaking old shi here. Also why do you need to zero allocated memory if
> you assigning all of it valid values?

Not all of the values are assigned.  Only the handle pid is accessible
with the current wineserver protocol.  The remainder of the fields are
best set to zero as this is a sane value for these fields to trigger
exceptions and figure out how/when these values are being accessed
(e.g. null pointers or null handles).  Later patches, which I have
already sent, try to fill in more of these fields.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-dlls-ntdll-Add-handle-count-to-NtQuerySystemInformat.patch
Type: text/x-patch
Size: 5707 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20110621/2c5bb764/attachment-0001.bin>

More information about the wine-devel mailing list