Commit b045fc23 authored by stevenjb's avatar stevenjb Committed by Commit bot

MNCH: Check result before accessing validated_user_settings

BUG=442613

Review URL: https://codereview.chromium.org/884013007

Cr-Commit-Position: refs/heads/master@{#315009}
parent 702ee6ef
......@@ -288,14 +288,6 @@ void ManagedNetworkConfigurationHandlerImpl::SetProperties(
&onc::kNetworkConfigurationSignature,
*user_settings_copy,
&validation_result);
// Fill in HexSSID field from contents of SSID field if not set already.
if (user_settings_copy) {
onc::FillInHexSSIDFieldsInOncObject(
onc::kNetworkConfigurationSignature, validated_user_settings.get());
}
if (validation_result == onc::Validator::INVALID) {
InvokeErrorCallback(service_path, error_callback, kInvalidUserSettings);
return;
......@@ -303,6 +295,12 @@ void ManagedNetworkConfigurationHandlerImpl::SetProperties(
if (validation_result == onc::Validator::VALID_WITH_WARNINGS)
LOG(WARNING) << "Validation of ONC user settings produced warnings.";
// Fill in HexSSID field from contents of SSID field if not set already.
if (user_settings_copy) {
onc::FillInHexSSIDFieldsInOncObject(onc::kNetworkConfigurationSignature,
validated_user_settings.get());
}
const base::DictionaryValue* network_policy =
GetByGUID(policies->per_network_config, guid);
VLOG(2) << "This configuration is " << (network_policy ? "" : "not ")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment