diff options
-rw-r--r-- | chrome/common/extensions/extension.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index cd2a8c7..2566d41 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -947,6 +947,11 @@ bool Extension::InitFromValue(const DictionaryValue& source, bool require_id, return false; } + if (permissions->GetSize() == 0) { + ExtensionErrorReporter::GetInstance()->ReportError( + errors::kInvalidPermissionCountWarning, false); + } + for (size_t i = 0; i < permissions->GetSize(); ++i) { std::string permission_str; if (!permissions->GetString(i, &permission_str)) { |