From 2dd2f7600d41253fe621b8d040ab57f0c202d71b Mon Sep 17 00:00:00 2001 From: Steve McIntyre Date: Sun, 22 Jan 2023 13:05:10 +0000 Subject: New upstream version 15.7 --- pe.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pe.c') diff --git a/pe.c b/pe.c index ba3e2bbc..9a3679e1 100644 --- a/pe.c +++ b/pe.c @@ -1196,6 +1196,9 @@ handle_image (void *data, unsigned int datasize, CopyMem(buffer, data, context.SizeOfHeaders); + /* Flush the instruction cache for the region holding the image */ + cache_invalidate(buffer, buffer + context.ImageSize); + *entry_point = ImageAddress(buffer, context.ImageSize, context.EntryPoint); if (!*entry_point) { perror(L"Entry point is invalid\n"); @@ -1256,7 +1259,7 @@ handle_image (void *data, unsigned int datasize, } if (Section->VirtualAddress <= context.EntryPoint && - (Section->VirtualAddress + Section->SizeOfRawData - 1) + (Section->VirtualAddress + Section->Misc.VirtualSize - 1) > context.EntryPoint) found_entry_point++; -- cgit v1.2.3