ParseCIDRBlock accepts invalid inputs |
|||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.18 Safari/537.36 Example URL: Steps to reproduce the problem: This came up during a review[1]: ParseCIDRBlock accepts invalid inputs when the number of bits has a leading plus sign: 192.168.1.1/+1 [1] https://codereview.chromium.org/1810183002/diff/10009/net/base/ip_address_unittest.cc#newcode250 What is the expected behavior? What went wrong? - Did this work before? N/A Chrome version: 50.0.2661.18 Channel: n/a OS Version: Flash Version: Shockwave Flash 21.0 r0
,
Mar 21 2016
,
Mar 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8a14cbc731ec72162def8a3122a91ce1a235752b commit 8a14cbc731ec72162def8a3122a91ce1a235752b Author: martijn <martijn@martijnc.be> Date: Mon Mar 21 20:11:23 2016 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 Review URL: https://codereview.chromium.org/1816903002 Cr-Commit-Position: refs/heads/master@{#382366} [modify] https://crrev.com/8a14cbc731ec72162def8a3122a91ce1a235752b/net/base/ip_address.cc [modify] https://crrev.com/8a14cbc731ec72162def8a3122a91ce1a235752b/net/base/ip_address_unittest.cc
,
Mar 23 2016
Fixed by Martin (see comment #3) |
|||
►
Sign in to add a comment |
|||
Comment 1 by xunji...@chromium.org
, Mar 21 2016