Index: net/tools/transport_security_state_generator/input_file_parsers.cc |
diff --git a/net/tools/transport_security_state_generator/input_file_parsers.cc b/net/tools/transport_security_state_generator/input_file_parsers.cc |
index 4a633080ed00ec5a830196241985c253babdc411..2a8d3d80490e566eafba195056a7d862cd4029e8 100644 |
--- a/net/tools/transport_security_state_generator/input_file_parsers.cc |
+++ b/net/tools/transport_security_state_generator/input_file_parsers.cc |
@@ -303,6 +303,12 @@ bool ParseJSON(base::StringPiece json, |
return false; |
} |
+ if (entry->hostname.empty()) { |
+ LOG(ERROR) << "The hostname for entry " << base::SizeTToString(i) |
+ << " is empty"; |
+ return false; |
+ } |
+ |
parsed->GetBoolean("include_subdomains", &entry->include_subdomains); |
std::string mode; |
parsed->GetString("mode", &mode); |