From 48c1db7cd05107e71295a8ca639250f5d1422c97 Mon Sep 17 00:00:00 2001 From: "cevans@chromium.org" Date: Mon, 17 Dec 2012 20:56:11 +0000 Subject: Check for a malformed message more carefully. Also fix non-deterministic gfx::Size value if a message omits width and height attributes. BUG=165747 Review URL: https://codereview.chromium.org/11548038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173531 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/proxy/ppb_graphics_3d_proxy.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ppapi') diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.cc b/ppapi/proxy/ppb_graphics_3d_proxy.cc index cef181a..9919df3 100644 --- a/ppapi/proxy/ppb_graphics_3d_proxy.cc +++ b/ppapi/proxy/ppb_graphics_3d_proxy.cc @@ -379,7 +379,9 @@ void PPB_Graphics3D_Proxy::OnMsgCreate(PP_Instance instance, HostResource share_context, const std::vector& attribs, HostResource* result) { - if (attribs.empty() || attribs.back() != PP_GRAPHICS3DATTRIB_NONE) + if (attribs.empty() || + attribs.back() != PP_GRAPHICS3DATTRIB_NONE || + !(attribs.size() & 1)) return; // Bad message. thunk::EnterResourceCreation enter(instance); -- cgit v1.1