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

Unified Diff: net/base/ip_address_unittest.cc

Issue 1816903002: Fix ParseCIDRBlock() to no longer accept invalid inputs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added a TODO 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
« no previous file with comments | « net/base/ip_address.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/ip_address_unittest.cc
diff --git a/net/base/ip_address_unittest.cc b/net/base/ip_address_unittest.cc
index d78f6c342e97c3ab0bfd1b921e2b67febff55a73..3ebcb72a98c69b18b01333b76acaa0df6356ceec 100644
--- a/net/base/ip_address_unittest.cc
+++ b/net/base/ip_address_unittest.cc
@@ -252,7 +252,10 @@ TEST(IPAddressTest, ParseCIDRBlock_Invalid) {
"::1/-3",
"a::3/129",
"::1/x",
- "192.168.0.1//11"};
+ "192.168.0.1//11",
+ "192.168.1.1/+1",
+ "192.168.1.1/ +1",
+ "192.168.1.1/"};
for (const auto& bad_literal : bad_literals) {
IPAddress ip_address;
« no previous file with comments | « net/base/ip_address.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698