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

Unified Diff: net/cert/x509_cert_types.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: Address remaining feedback 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/cert/x509_cert_types.cc
diff --git a/net/cert/x509_cert_types.cc b/net/cert/x509_cert_types.cc
index 766a1f0429b3a6add189dc7ba5065d5e5cd982b8..f439c2655f6fe6eda3320bdd394245069e04d07f 100644
--- a/net/cert/x509_cert_types.cc
+++ b/net/cert/x509_cert_types.cc
@@ -23,8 +23,8 @@ namespace {
// untouched otherwise. Returns the parsed integer.
int ParseIntAndAdvance(const char** field, size_t field_len, bool* ok) {
int result = 0;
- *ok &=
- ParseNonNegativeDecimalInt(base::StringPiece(*field, field_len), &result);
+ *ok &= ParseIntegerBase10(base::StringPiece(*field, field_len),
+ ParseInteger::DISALLOW_NEGATIVE, &result);
*field += field_len;
return result;
}

Powered by Google App Engine
This is Rietveld 408576698