20 Jun
2011
20 Jun
'11
8:52 a.m.
On 06/20/2011 05:28 AM, Austin Lund wrote:
Thanks for the review. Does this patch address these concerns correctly? No quite there yet:
+ SERVER_START_REQ( create_snapshot ) You not checking if this call succeeded or not.
+ while (sizeof(ULONG) + sizeof(SYSTEM_HANDLE_ENTRY)*shi->Count >= len) You don't need a loop to calculate new size.
+ shi = RtlReAllocateHeap(GetProcessHeap(), HEAP_ZERO_MEMORY, shi, len); + if (shi == NULL) + return STATUS_NO_MEMORY; You leaking old shi here. Also why do you need to zero allocated memory if you assigning all of it valid values?
Vitaliy.