Skip to content
Snippets Groups Projects
Commit 63fb1633 authored by Rémi Bernon's avatar Rémi Bernon :speech_balloon: Committed by Alexandre Julliard
Browse files

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
parent 26c1edf4
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment