| Index: chrome/browser/extensions/extension_action.cc
|
| diff --git a/chrome/browser/extensions/extension_action.cc b/chrome/browser/extensions/extension_action.cc
|
| index 106ed3a054f125fca3d2f8041c9e3fb307040446..d0b284c5370b9a78cb6f111d254de7ea01a412eb 100644
|
| --- a/chrome/browser/extensions/extension_action.cc
|
| +++ b/chrome/browser/extensions/extension_action.cc
|
| @@ -130,8 +130,12 @@ bool ExtensionAction::ParseIconFromCanvasDictionary(
|
| for (base::DictionaryValue::Iterator iter(dict); !iter.IsAtEnd();
|
| iter.Advance()) {
|
| int icon_size = 0;
|
| - if (!base::StringToInt(iter.key(), &icon_size))
|
| + // Chrome helpfully scales the provided icon(s), but let's not go overboard.
|
| + const int kActionIconMaxSize = 10 * extension_misc::EXTENSION_ICON_ACTION;
|
| + if (!base::StringToInt(iter.key(), &icon_size) || icon_size <= 0 ||
|
| + icon_size > kActionIconMaxSize) {
|
| continue;
|
| + }
|
|
|
| const base::BinaryValue* image_data;
|
| std::string binary_string64;
|
|
|