Skip to content

Commit

Permalink
Specify maximum IP address length
Browse files Browse the repository at this point in the history
Co-authored-by: Cheng XU <[email protected]>
  • Loading branch information
syvb and xu-cheng authored Aug 10, 2021
1 parent ace518d commit 403d269
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/net/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl<'a> Parser<'a> {
*slot = p.read_separator('.', i, |p| {
// Disallow octal number in IP string.
// https://tools.ietf.org/html/rfc6943#section-3.1.1
p.read_number(10, None, false)
p.read_number(10, Some(3), false)
})?;
}

Expand Down

0 comments on commit 403d269

Please sign in to comment.