1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-05 17:28:47 +00:00

ntdll: Do not reject data directories at the end of a file.

Found when wpfgfx_cor3.dll failed to relocate in Bentley CONNECTION Client.

Fixes: 56d9e1a8a8.
This commit is contained in:
Zebediah Figura 2023-10-26 10:46:22 -05:00 committed by Alexandre Julliard
parent 6972aa77c1
commit 229ccfd048

View File

@ -2612,7 +2612,7 @@ static IMAGE_DATA_DIRECTORY *get_data_dir( IMAGE_NT_HEADERS *nt, SIZE_T total_si
if (!data->Size) return NULL;
if (!data->VirtualAddress) return NULL;
if (data->VirtualAddress >= total_size) return NULL;
if (data->Size >= total_size - data->VirtualAddress) return NULL;
if (data->Size > total_size - data->VirtualAddress) return NULL;
return data;
}