Rémi Bernon : ntdll: Ignore free list headers in HEAP_FindFreeBlock.
Alexandre Julliard
julliard at winehq.org
Mon May 23 15:51:52 CDT 2022
Module: wine
Branch: master
Commit: a436cc6485a29beb7728528d005a6a30cd3934f6
URL: https://source.winehq.org/git/wine.git/?a=commit;h=a436cc6485a29beb7728528d005a6a30cd3934f6
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Tue May 3 18:19:36 2022 +0200
ntdll: Ignore free list headers in HEAP_FindFreeBlock.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
dlls/ntdll/heap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c
index 96bb0d0c027..658a8bc1ab0 100644
--- a/dlls/ntdll/heap.c
+++ b/dlls/ntdll/heap.c
@@ -1069,6 +1069,7 @@ static struct block *find_free_block( HEAP *heap, SIZE_T data_size, SUBHEAP **su
while ((ptr = list_next( &heap->freeList[0].arena.entry, ptr )))
{
entry = LIST_ENTRY( ptr, struct entry, entry );
+ if (entry->size == (0 | ARENA_FLAG_FREE)) continue;
arena_size = (entry->size & ARENA_SIZE_MASK) + sizeof(ARENA_FREE) - sizeof(ARENA_INUSE);
if (arena_size >= data_size)
{
More information about the wine-cvs
mailing list