mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
dhcp6: fix buffer size checking
This commit is contained in:
parent
23976cb928
commit
cb1bdeaf56
@ -844,8 +844,8 @@ static int client_parse_message(
|
||||
uint8_t *optval;
|
||||
be32_t iaid_lease;
|
||||
|
||||
if (len < offsetof(DHCP6Option, data) ||
|
||||
len < offsetof(DHCP6Option, data) + be16toh(option->len))
|
||||
if (len < pos + offsetof(DHCP6Option, data) ||
|
||||
len < pos + offsetof(DHCP6Option, data) + be16toh(option->len))
|
||||
return -ENOBUFS;
|
||||
|
||||
optcode = be16toh(option->code);
|
||||
|
Loading…
Reference in New Issue
Block a user