Index: content/browser/web_contents/web_contents_impl.cc |
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
index 23dfc68b3549ce8d9c24e15c456919f0c601d467..3d1da2c3095aa49db4e3630b9284245bfda67195 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -2511,6 +2511,11 @@ void WebContentsImpl::OnDidDownloadImage( |
const GURL& image_url, |
const std::vector<SkBitmap>& bitmaps, |
const std::vector<gfx::Size>& original_bitmap_sizes) { |
+ if (bitmaps.size() != original_bitmap_sizes.size()) { |
+ GetRenderProcessHost()->ReceivedBadMessage(); |
+ 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 |