On 06/20/2011 09:36 PM, Austin Lund wrote:
On 20 June 2011 23:52, Vitaliy Margolenwine-devel@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.
Makes sense. The patch looks good to me.
Vitaliy.