mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-16 03:27:25 +00:00
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
This commit is contained in:
parent
26c1edf4b2
commit
63fb16338c
|
@ -2092,7 +2092,6 @@ static NTSTATUS heap_resize_large( struct heap *heap, ULONG flags, struct block
|
||||||
SIZE_T old_block_size = large->block_size;
|
SIZE_T old_block_size = large->block_size;
|
||||||
*old_size = large->data_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;
|
if (old_block_size < block_size) return STATUS_NO_MEMORY;
|
||||||
|
|
||||||
/* FIXME: we could remap zero-pages instead */
|
/* FIXME: we could remap zero-pages instead */
|
||||||
|
|
Loading…
Reference in a new issue