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

Unified Diff: net/http/transport_security_state.cc

Issue 663903002: net: fix bug in compact HSTS representation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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 | net/http/transport_security_state_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/transport_security_state.cc
diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc
index d1091be20690afbb867efc90c4b79a977f26876e..d0c0b33a896588bc86e6e1c1414f9d3532f60284 100644
--- a/net/http/transport_security_state.cc
+++ b/net/http/transport_security_state.cc
@@ -552,7 +552,7 @@ bool DecodeHSTSPreloadRaw(const std::string& hostname,
return false;
}
- if (bit_offset <= jump_delta) {
+ if (bit_offset < jump_delta) {
return false;
}
@@ -598,8 +598,8 @@ bool DecodeHSTSPreload(const std::string& hostname,
PreloadResult* out) {
bool found;
if (!DecodeHSTSPreloadRaw(hostname, &found, out)) {
- LOG(ERROR) << "Internal error in DecodeHSTSPreloadRaw for hostname "
- << hostname;
+ DCHECK(false) << "Internal error in DecodeHSTSPreloadRaw for hostname "
+ << hostname;
return false;
}
« no previous file with comments | « no previous file | net/http/transport_security_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698