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

Unified Diff: net/base/ip_address.cc

Issue 1828103002: Extend net/base/parse_number.h for parsing of negative numbers, and determining if there was overflo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@proxy_num
Patch Set: Created 4 years, 9 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
Index: net/base/ip_address.cc
diff --git a/net/base/ip_address.cc b/net/base/ip_address.cc
index b805317eef3675ea0dafe63353bef32bb199c8aa..3dc9ea471424873a88d607b6c81dcd1c2fd41a07 100644
--- a/net/base/ip_address.cc
+++ b/net/base/ip_address.cc
@@ -181,7 +181,7 @@ bool ParseCIDRBlock(const std::string& cidr_literal,
// Parse the prefix length.
int number_of_bits = -1;
- if (!ParseNonNegativeDecimalInt(parts[1], &number_of_bits))
+ if (!ParseNonNegativeInteger(parts[1], &number_of_bits))
return false;
// Make sure the prefix length is in a valid range.

Powered by Google App Engine
This is Rietveld 408576698