summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authorcevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-17 20:56:11 +0000
committercevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-17 20:56:11 +0000
commit48c1db7cd05107e71295a8ca639250f5d1422c97 (patch)
tree4368634e80cf3187127117d52f8acf0a0a8f4c96 /ppapi
parent85f9f951739b957ed698a88923c8242a95392345 (diff)
downloadchromium_src-48c1db7cd05107e71295a8ca639250f5d1422c97.zip
chromium_src-48c1db7cd05107e71295a8ca639250f5d1422c97.tar.gz
chromium_src-48c1db7cd05107e71295a8ca639250f5d1422c97.tar.bz2
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
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/proxy/ppb_graphics_3d_proxy.cc4
1 files changed, 3 insertions, 1 deletions
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<int32_t>& 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);