mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 15:48:06 +02:00
dhcp6: fix buffer size checking
(cherry picked from commit cb1bdeaf56852275e6b0dd1fba932bb174767f70)
(cherry picked from commit 91fb1673d5)
This commit is contained in:
parent
3fd9d11619
commit
15a3c6c692
1 changed files with 2 additions and 2 deletions
|
|
@ -776,8 +776,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…
Add table
Reference in a new issue