aboutsummaryrefslogtreecommitdiff
path: root/libsanitizer/interception/interception_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsanitizer/interception/interception_win.cpp')
-rw-r--r--libsanitizer/interception/interception_win.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libsanitizer/interception/interception_win.cpp b/libsanitizer/interception/interception_win.cpp
index b94e214..1a1c327 100644
--- a/libsanitizer/interception/interception_win.cpp
+++ b/libsanitizer/interception/interception_win.cpp
@@ -883,8 +883,8 @@ uptr InternalGetProcAddress(void *module, const char *func_name) {
// Check that the module header is full and present.
RVAPtr<IMAGE_DOS_HEADER> dos_stub(module, 0);
RVAPtr<IMAGE_NT_HEADERS> headers(module, dos_stub->e_lfanew);
- if (!module || dos_stub->e_magic != IMAGE_DOS_SIGNATURE || // "MZ"
- headers->Signature != IMAGE_NT_SIGNATURE || // "PE\0\0"
+ if (!module || dos_stub->e_magic != IMAGE_DOS_SIGNATURE || // "MZ"
+ headers->Signature != IMAGE_NT_SIGNATURE || // "PE\0\0"
headers->FileHeader.SizeOfOptionalHeader <
sizeof(IMAGE_OPTIONAL_HEADER)) {
return 0;
@@ -963,8 +963,8 @@ bool OverrideImportedFunction(const char *module_to_patch,
// Check that the module header is full and present.
RVAPtr<IMAGE_DOS_HEADER> dos_stub(module, 0);
RVAPtr<IMAGE_NT_HEADERS> headers(module, dos_stub->e_lfanew);
- if (!module || dos_stub->e_magic != IMAGE_DOS_SIGNATURE || // "MZ"
- headers->Signature != IMAGE_NT_SIGNATURE || // "PE\0\0"
+ if (!module || dos_stub->e_magic != IMAGE_DOS_SIGNATURE || // "MZ"
+ headers->Signature != IMAGE_NT_SIGNATURE || // "PE\0\0"
headers->FileHeader.SizeOfOptionalHeader <
sizeof(IMAGE_OPTIONAL_HEADER)) {
return false;