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

Unified Diff: webkit/plugins/npapi/plugin_group.cc

Issue 6578022: Merge 75858 - Don't access WebPluginInfo array out of bounds in PluginGroup::... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/648/src/
Patch Set: Created 9 years, 10 months 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 | webkit/plugins/npapi/plugin_group_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/npapi/plugin_group.cc
===================================================================
--- webkit/plugins/npapi/plugin_group.cc (revision 75905)
+++ webkit/plugins/npapi/plugin_group.cc (working copy)
@@ -238,12 +238,14 @@
bool PluginGroup::RemovePlugin(const FilePath& filename) {
bool did_remove = false;
ResetGroupState();
- for (size_t i = 0; i < web_plugin_infos_.size(); ++i) {
+ for (size_t i = 0; i < web_plugin_infos_.size();) {
if (web_plugin_infos_[i].path == filename) {
web_plugin_infos_.erase(web_plugin_infos_.begin() + i);
did_remove = true;
+ } else {
+ UpdateActivePlugin(web_plugin_infos_[i]);
+ i++;
}
- UpdateActivePlugin(web_plugin_infos_[i]);
}
return did_remove;
}
« no previous file with comments | « no previous file | webkit/plugins/npapi/plugin_group_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698