From 28c68fb241737c66562b20e2a26118225ec589ea Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 13 Aug 2020 21:12:59 +0200 Subject: [PATCH] AK: Fix bad vector access in two-part IPv4 address parsing --- AK/IPv4Address.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AK/IPv4Address.h b/AK/IPv4Address.h index 733987c9f3..cc03c9ffed 100644 --- a/AK/IPv4Address.h +++ b/AK/IPv4Address.h @@ -88,10 +88,10 @@ public: c = 0; d = parts[1].to_uint().value_or(256); } else if (parts.size() == 2) { - a = parts[1].to_uint().value_or(256); + a = parts[0].to_uint().value_or(256); b = 0; c = 0; - d = parts[2].to_uint().value_or(256); + d = parts[1].to_uint().value_or(256); } else if (parts.size() == 3) { a = parts[0].to_uint().value_or(256); b = parts[1].to_uint().value_or(256);