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

Unified Diff: net/base/lookup_string_in_fixed_set.cc

Issue 2653613004: Simpler repro of DCHECK badness in release builds.
Patch Set: Created 3 years, 11 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: net/base/lookup_string_in_fixed_set.cc
diff --git a/net/base/lookup_string_in_fixed_set.cc b/net/base/lookup_string_in_fixed_set.cc
index 46497f3c47bb654c44e6aa34f9b72a2fd5820fb9..bcf9246dda82b15954cfb85ee33448a799e1b172 100644
--- a/net/base/lookup_string_in_fixed_set.cc
+++ b/net/base/lookup_string_in_fixed_set.cc
@@ -96,6 +96,7 @@ int LookupStringInFixedSet(const unsigned char* graph,
const unsigned char* offset = pos;
const char* key_end = key + key_length;
while (GetNextOffset(&pos, end, &offset)) {
+ DCHECK((pos == nullptr) || pos < end);
// char <char>+ end_char offsets
// char <char>+ return value
// char end_char offsets
« 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