Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(617)

Unified Diff: sandbox/win/src/service_resolver_64.cc

Issue 1504943002: [Sandbox service resolver hooks] Remove the RET hijacking in ntdll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/win/src/resolver_64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/service_resolver_64.cc
diff --git a/sandbox/win/src/service_resolver_64.cc b/sandbox/win/src/service_resolver_64.cc
index c0e684c795b25a67a2b49bc673d35b0d5678a103..8dcea7dea336cf542bc06124298a50df492e4807 100644
--- a/sandbox/win/src/service_resolver_64.cc
+++ b/sandbox/win/src/service_resolver_64.cc
@@ -139,9 +139,9 @@ NTSTATUS ServiceResolverThunk::Setup(const void* target_module,
void* thunk_storage,
size_t storage_bytes,
size_t* storage_used) {
- NTSTATUS ret = Init(target_module, interceptor_module, target_name,
- interceptor_name, interceptor_entry_point,
- thunk_storage, storage_bytes);
+ NTSTATUS ret =
+ Init(target_module, interceptor_module, target_name, interceptor_name,
+ interceptor_entry_point, thunk_storage, storage_bytes);
if (!NT_SUCCESS(ret))
return ret;
@@ -213,7 +213,7 @@ NTSTATUS ServiceResolverThunk::PerformPatch(void* local_thunk,
void* remote_thunk) {
// Patch the original code.
ServiceEntry local_service;
- DCHECK_NT(GetInternalThunkSize() >= sizeof(local_service));
+ DCHECK_NT(GetInternalThunkSize() <= sizeof(local_service));
jschuh 2015/12/08 01:19:42 Heh, that's an interesting one.
if (!SetInternalThunk(&local_service, sizeof(local_service), NULL,
interceptor_))
return STATUS_UNSUCCESSFUL;
« no previous file with comments | « sandbox/win/src/resolver_64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698