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

Unified Diff: ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_host_resolver_private_rpc_server.cc

Issue 9837063: Fix warning as error, check struct size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_host_resolver_private_rpc_server.cc
===================================================================
--- ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_host_resolver_private_rpc_server.cc (revision 128518)
+++ ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_host_resolver_private_rpc_server.cc (working copy)
@@ -159,8 +159,12 @@
nacl_abi_size_t* addr_bytes, char* addr,
int32_t* success) {
NaClSrpcClosureRunner runner(done);
- rpc->result = NACL_SRPC_RESULT_OK;
+ rpc->result = NACL_SRPC_RESULT_APP_ERROR;
+ if (*addr_bytes !=
+ static_cast<nacl_abi_size_t>(sizeof(PP_NetAddress_Private)))
+ return;
+
PP_Bool pp_success =
PPBHostResolverPrivateInterface()->GetNetAddress(
host_resolver,
@@ -170,4 +174,6 @@
DebugPrintf("PPB_HostResolver_Private::GetNetAddress: " \
"success=%d\n", *success);
+
+ rpc->result = NACL_SRPC_RESULT_OK;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698