aboutsummaryrefslogtreecommitdiff
path: root/libsanitizer/interception/interception_win.cpp
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-11-05 14:54:57 +0100
committerMartin Liska <marxin@gcc.gnu.org>2019-11-05 13:54:57 +0000
commit3ca75cd55030a53a858bdbe9aba6d87f6b1e90b8 (patch)
treec3eb5c5658e168b819d23dd20aa46d614089c649 /libsanitizer/interception/interception_win.cpp
parent9bae89924afc811bd10e249856bf78dd19f20df2 (diff)
downloadgcc-3ca75cd55030a53a858bdbe9aba6d87f6b1e90b8.zip
gcc-3ca75cd55030a53a858bdbe9aba6d87f6b1e90b8.tar.gz
gcc-3ca75cd55030a53a858bdbe9aba6d87f6b1e90b8.tar.bz2
Libsanitizer: merge from trunk with merge.sh.
2019-11-05 Martin Liska <mliska@suse.cz> * all source files: Merge from upstream r375507. From-SVN: r277834
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;