Skip to content

Commit 403d269

Browse files
syvbxu-cheng
andauthored
Specify maximum IP address length
Co-authored-by: Cheng XU <[email protected]>
1 parent ace518d commit 403d269

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/net/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ impl<'a> Parser<'a> {
148148
*slot = p.read_separator('.', i, |p| {
149149
// Disallow octal number in IP string.
150150
// https://tools.ietf.org/html/rfc6943#section-3.1.1
151-
p.read_number(10, None, false)
151+
p.read_number(10, Some(3), false)
152152
})?;
153153
}
154154

0 commit comments

Comments
 (0)