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

Issue 1816903002: Fix ParseCIDRBlock() to no longer accept invalid inputs. (Closed)

Created:
4 years, 9 months ago by martijnc
Modified:
4 years, 9 months ago
Reviewers:
eroman
CC:
cbentzel+watch_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix ParseCIDRBlock() to no longer accept invalid inputs. ParseCIDRBlock() currently accepts invalid inputs when the prefix contains a leading plus sign: "192.168.1.1/+1". This CL updates ParseCIDRBlock() to reject these inputs as invalid. BUG=596258 Committed: https://crrev.com/8a14cbc731ec72162def8a3122a91ce1a235752b Cr-Commit-Position: refs/heads/master@{#382366}

Patch Set 1 : #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : added a TODO #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -2 lines) Patch
M net/base/ip_address.cc View 1 2 1 chunk +7 lines, -1 line 0 comments Download
M net/base/ip_address_unittest.cc View 1 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 17 (9 generated)
martijnc
This is a small follow up CL to fix ParseCIDRBlock(). Added a simple check for ...
4 years, 9 months ago (2016-03-21 16:49:54 UTC) #6
eroman
lgtm https://codereview.chromium.org/1816903002/diff/60001/net/base/ip_address.cc File net/base/ip_address.cc (right): https://codereview.chromium.org/1816903002/diff/60001/net/base/ip_address.cc#newcode161 net/base/ip_address.cc:161: const base::StringPiece& prefix_length = parts[1]; Can you add ...
4 years, 9 months ago (2016-03-21 17:28:31 UTC) #7
martijnc
Thank you. https://codereview.chromium.org/1816903002/diff/60001/net/base/ip_address.cc File net/base/ip_address.cc (right): https://codereview.chromium.org/1816903002/diff/60001/net/base/ip_address.cc#newcode161 net/base/ip_address.cc:161: const base::StringPiece& prefix_length = parts[1]; On 2016/03/21 ...
4 years, 9 months ago (2016-03-21 18:29:04 UTC) #9
martijnc
Would it be better (since this isn't a regression) to hold of landing this until ...
4 years, 9 months ago (2016-03-21 19:10:34 UTC) #10
eroman
Since you have already written and tested this, I am fine with landing it. More ...
4 years, 9 months ago (2016-03-21 19:13:40 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1816903002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1816903002/100001
4 years, 9 months ago (2016-03-21 19:18:07 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (id:100001)
4 years, 9 months ago (2016-03-21 20:11:31 UTC) #15
commit-bot: I haz the power
4 years, 9 months ago (2016-03-21 20:12:49 UTC) #17
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/8a14cbc731ec72162def8a3122a91ce1a235752b
Cr-Commit-Position: refs/heads/master@{#382366}

Powered by Google App Engine
This is Rietveld 408576698