mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 08:56:40 +00:00
AK: Fix bad vector access in two-part IPv4 address parsing
This commit is contained in:
parent
21bb269919
commit
28c68fb241
|
@ -88,10 +88,10 @@ public:
|
||||||
c = 0;
|
c = 0;
|
||||||
d = parts[1].to_uint().value_or(256);
|
d = parts[1].to_uint().value_or(256);
|
||||||
} else if (parts.size() == 2) {
|
} else if (parts.size() == 2) {
|
||||||
a = parts[1].to_uint().value_or(256);
|
a = parts[0].to_uint().value_or(256);
|
||||||
b = 0;
|
b = 0;
|
||||||
c = 0;
|
c = 0;
|
||||||
d = parts[2].to_uint().value_or(256);
|
d = parts[1].to_uint().value_or(256);
|
||||||
} else if (parts.size() == 3) {
|
} else if (parts.size() == 3) {
|
||||||
a = parts[0].to_uint().value_or(256);
|
a = parts[0].to_uint().value_or(256);
|
||||||
b = parts[1].to_uint().value_or(256);
|
b = parts[1].to_uint().value_or(256);
|
||||||
|
|
Loading…
Reference in a new issue