mirror of
https://github.com/systemd/systemd.git
synced 2026-08-11 09:36:28 +00:00
dhcp6: fix buffer size checking
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user