11 Feb
2023
11 Feb
'23
2:27 p.m.
Jinoh Kang (@iamahuman) commented about dlls/ntdll/heap.c:
heap_set_debug_flags( heap );
+ if (heap->flags & HEAP_GROWABLE) + { + SIZE_T size = (sizeof(struct bin) + sizeof(struct group *) * ARRAY_SIZE(affinity_mapping)) * BLOCK_SIZE_BIN_COUNT; + struct group **affinity_group_base; + + NtAllocateVirtualMemory( NtCurrentProcess(), (void *)&heap->bins, + 0, &size, MEM_COMMIT, PAGE_READWRITE ); +
You should account for allocation failure. ```suggestion:-0+0 } if (heap->bins) { ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1628#note_23834