Rémi Bernon : ntdll: Avoid shrinking large heap block to small block.
Module: wine Branch: master Commit: 63fb16338c4017a80cbe49d0f5f232babb1a5f1a URL: https://gitlab.winehq.org/wine/wine/-/commit/63fb16338c4017a80cbe49d0f5f232b... Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Feb 20 14:20:20 2023 +0100 ntdll: Avoid shrinking large heap block to small block. Even though this is a waste of memory it seems to trip on some UAF with some games. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54475 --- dlls/ntdll/heap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index afe38eddaa8..6688fab9690 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -2092,7 +2092,6 @@ static NTSTATUS heap_resize_large( struct heap *heap, ULONG flags, struct block SIZE_T old_block_size = large->block_size; *old_size = large->data_size; - if (block_size < HEAP_MIN_LARGE_BLOCK_SIZE / 4) return STATUS_NO_MEMORY; /* shrinking large block to small block */ if (old_block_size < block_size) return STATUS_NO_MEMORY; /* FIXME: we could remap zero-pages instead */
participants (1)
-
Alexandre Julliard