commit | 229ef3b408e3b6942fe12bbaf59e3a351b315722 | [log] [tgz] |
---|---|---|
author | [email protected] <[email protected]@0039d316-1c4b-4281-b951-d872f2087c98> | Tue Jan 21 07:46:13 2014 |
committer | [email protected] <[email protected]@0039d316-1c4b-4281-b951-d872f2087c98> | Tue Jan 21 07:46:13 2014 |
tree | 6d7f9bd1688761899fdadc105c46eb72e6244626 | |
parent | d83ef2f7fa8c5694a62f822c56e6e269708bdbc2 [diff] [blame] |
Validate vector lengths in ImageHostMsg_DidDownloadImage [email protected] BUG=333038 Review URL: https://codereview.chromium.org/136853008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245992 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index 23dfc68..6b91ca8 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2511,6 +2511,9 @@ const GURL& image_url, const std::vector<SkBitmap>& bitmaps, const std::vector<gfx::Size>& original_bitmap_sizes) { + if (bitmaps.size() != original_bitmap_sizes.size()) + return; + ImageDownloadMap::iterator iter = image_download_map_.find(id); if (iter == image_download_map_.end()) { // Currently WebContents notifies us of ANY downloads so that it is