AK: Fix obvious bad vector access in IPv4Address::from_string()

Fixes #3137.
This commit is contained in:
Andreas Kling 2020-08-14 15:05:35 +02:00
parent 2336c62901
commit 6b8807be6e
Notes: sideshowbarker 2024-07-19 03:38:50 +09:00

View file

@ -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;