Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3459)

Unified Diff: chrome/browser/ui/webui/extensions/extension_icon_source.cc

Issue 11576030: Add size checks to extension icons to prevent out of memory conditions (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/favicon_source.cc » ('j') | chrome/browser/ui/webui/favicon_source.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/extensions/extension_icon_source.cc
===================================================================
--- chrome/browser/ui/webui/extensions/extension_icon_source.cc (revision 173105)
+++ chrome/browser/ui/webui/extensions/extension_icon_source.cc (working copy)
@@ -273,6 +273,8 @@
return false;
if (size <= 0)
return false;
+ if (size > extension_misc::EXTENSION_ICON_GIGANTOR)
+ size = extension_misc::EXTENSION_ICON_GIGANTOR;
Matt Perry 2012/12/14 19:33:44 Let's return false instead.
ExtensionIconSet::MatchType match_type;
int match_num;
« no previous file with comments | « no previous file | chrome/browser/ui/webui/favicon_source.cc » ('j') | chrome/browser/ui/webui/favicon_source.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698