From 403d269f20c9b1d71efccf1e95ef76470dd7ebe5 Mon Sep 17 00:00:00 2001 From: Smittyvb Date: Tue, 10 Aug 2021 16:43:17 -0400 Subject: [PATCH] Specify maximum IP address length Co-authored-by: Cheng XU <3105373+xu-cheng@users.noreply.github.com> --- library/std/src/net/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/net/parser.rs b/library/std/src/net/parser.rs index e233d605ce55..4e16a55edece 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) })?; }