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

Unified Diff: components/autofill/core/browser/autofill_manager.cc

Issue 115733009: [Autofill] Bail on corrupt AutofillHostMsg_ShowPasswordSuggestions message (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/autofill_manager.cc
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index b780de8caceffd1700b55c08cc61196f365f5c1e..edaa35e780f30ef0430f9d73d7d02e362adaede7 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -609,6 +609,10 @@ void AutofillManager::OnShowPasswordSuggestions(
const gfx::RectF& bounds,
const std::vector<base::string16>& suggestions,
const std::vector<base::string16>& realms) {
+ // Bail if the IPC message is corrupt.
+ if (suggestions.size() != realms.size())
palmer 2013/12/20 00:08:08 Does it also make sense to set some minimum and/or
Ilya Sherman 2013/12/20 00:15:00 Hmm, we already check this in the renderer, so I g
+ return;
+
external_delegate_->OnShowPasswordSuggestions(suggestions,
realms,
field,
@@ -617,6 +621,7 @@ void AutofillManager::OnShowPasswordSuggestions(
void AutofillManager::OnSetDataList(const std::vector<base::string16>& values,
const std::vector<base::string16>& labels) {
+ // Bail if the IPC message is corrupt.
if (values.size() != labels.size())
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698