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:
parent
6972aa77c1
commit
229ccfd048
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue