diff options
author | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-17 20:56:11 +0000 |
---|---|---|
committer | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-17 20:56:11 +0000 |
commit | 48c1db7cd05107e71295a8ca639250f5d1422c97 (patch) | |
tree | 4368634e80cf3187127117d52f8acf0a0a8f4c96 /ppapi | |
parent | 85f9f951739b957ed698a88923c8242a95392345 (diff) | |
download | chromium_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.cc | 4 |
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); |