Mercurial > pub > dyncall > dyncall
changeset 425:2d9f1cb06352
- dynload: corrected comparison of size of optional PE header info to what is pointed to (ptr arithmetic was incorrect, only broke ReactOS builds and runtime, though)
author | Tassilo Philipp |
---|---|
date | Fri, 17 Dec 2021 18:50:58 +0100 |
parents | 1e65b8911603 |
children | 02c57a13b839 |
files | dynload/dynload_syms_pe.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dynload/dynload_syms_pe.c Fri Dec 17 18:44:22 2021 +0100 +++ b/dynload/dynload_syms_pe.c Fri Dec 17 18:50:58 2021 +0100 @@ -61,7 +61,7 @@ pNTHeader = (IMAGE_NT_HEADERS*)(base + pDOSHeader->e_lfanew); /* optional header present and big enough? this header should exist as it's only optional for object files */ - if(pNTHeader->FileHeader.SizeOfOptionalHeader < (&pNTHeader->OptionalHeader.DataDirectory - &pNTHeader->OptionalHeader)) + if(pNTHeader->FileHeader.SizeOfOptionalHeader < ((char*)&pNTHeader->OptionalHeader.DataDirectory - (char*)&pNTHeader->OptionalHeader)) return NULL; /* export table available? */