about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSmittyvb <me@smitop.com>2021-08-10 16:43:17 -0400
committerGitHub <noreply@github.com>2021-08-10 16:43:17 -0400
commit403d269f20c9b1d71efccf1e95ef76470dd7ebe5 (patch)
tree723be2c38814324ad5e110ba14553baeb62072d9
parentace518de9a28559ff8e062b67c6a4b55287ca1a9 (diff)
downloadrust-403d269f20c9b1d71efccf1e95ef76470dd7ebe5.tar.gz
rust-403d269f20c9b1d71efccf1e95ef76470dd7ebe5.zip
Specify maximum IP address length
Co-authored-by: Cheng XU <3105373+xu-cheng@users.noreply.github.com>
-rw-r--r--library/std/src/net/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/net/parser.rs b/library/std/src/net/parser.rs
index e233d605ce5..4e16a55edec 100644
--- a/library/std/src/net/parser.rs
+++ b/library/std/src/net/parser.rs
@@ -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)
                 })?;
             }