From 6b8807be6ea9a2b19cebc76fcacab2bc456d1119 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 14 Aug 2020 15:05:35 +0200 Subject: [PATCH] AK: Fix obvious bad vector access in IPv4Address::from_string() Fixes #3137. --- AK/IPv4Address.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/IPv4Address.h b/AK/IPv4Address.h index cc03c9ffede..68ac1030ee6 100644 --- a/AK/IPv4Address.h +++ b/AK/IPv4Address.h @@ -86,7 +86,7 @@ public: a = 0; b = 0; c = 0; - d = parts[1].to_uint().value_or(256); + d = parts[0].to_uint().value_or(256); } else if (parts.size() == 2) { a = parts[0].to_uint().value_or(256); b = 0;