From ebc4e18bbeb1fc4a4777ca2ac416ba9295df105c Mon Sep 17 00:00:00 2001 From: "nsylvain@chromium.org" Date: Tue, 18 Nov 2008 01:47:05 +0000 Subject: Application Verifier hooks GetProcAddress and returns pointer to functions in its own dll instead. When we try to patch these functions, we fail because the appverif dll is not loaded yet. We need to get the real pointers to the NT functions. Review URL: http://codereview.chromium.org/11412 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5591 0039d316-1c4b-4281-b951-d872f2087c98 --- sandbox/src/service_resolver.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sandbox/src/service_resolver.cc') diff --git a/sandbox/src/service_resolver.cc b/sandbox/src/service_resolver.cc index 97cb205..6491138 100644 --- a/sandbox/src/service_resolver.cc +++ b/sandbox/src/service_resolver.cc @@ -5,6 +5,7 @@ #include "sandbox/src/service_resolver.h" #include "base/logging.h" +#include "sandbox/src/pe_image.h" #include "sandbox/src/sandbox_types.h" #include "sandbox/src/sandbox_utils.h" @@ -157,7 +158,8 @@ NTSTATUS ServiceResolverThunk::ResolveTarget(const void* module, if (NULL == module) return STATUS_UNSUCCESSFUL; - *address = ::GetProcAddress(bit_cast(module), function_name); + PEImage module_image(module); + *address = module_image.GetProcAddress(function_name); if (NULL == *address) return STATUS_UNSUCCESSFUL; -- cgit v1.1