AK: Fix bad vector access in two-part IPv4 address parsing

This commit is contained in:
Andreas Kling 2020-08-13 21:12:59 +02:00
parent 21bb269919
commit 28c68fb241

View file

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