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

Unified Diff: chromeos/network/policy_util.cc

Issue 23757025: Fix crash for badly formed ONC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/policy_util.cc
diff --git a/chromeos/network/policy_util.cc b/chromeos/network/policy_util.cc
index e1a01a78dbad87048a591f89b29eaa615e040730..c05d067beffd0093a8c1573563583eaaef7bd0d7 100644
--- a/chromeos/network/policy_util.cc
+++ b/chromeos/network/policy_util.cc
@@ -47,9 +47,10 @@ void RemoveFakeCredentials(
if (value->GetAsDictionary(&nested_object)) {
const onc::OncFieldSignature* field_signature =
onc::GetFieldSignature(signature, field_name);
-
- RemoveFakeCredentials(*field_signature->value_signature,
- nested_object);
+ if (field_signature)
+ RemoveFakeCredentials(*field_signature->value_signature, nested_object);
+ else
+ LOG(ERROR) << "ONC has unrecoginzed field: " << field_name;
continue;
}
« 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