mirror of
https://github.com/systemd/systemd.git
synced 2024-10-28 11:55:44 +03:00
sd-dhcp-client: fix memory corruption
This commit is contained in:
parent
31927c16de
commit
b087416f97
@ -783,7 +783,7 @@ static int client_parse_offer(uint8_t code, uint8_t len, const uint8_t *option,
|
||||
memcpy(&lease->dns[i]->s_addr, option + 4 * i, 4);
|
||||
}
|
||||
|
||||
lease->dns[i + 1] = NULL;
|
||||
lease->dns[len / 4] = NULL;
|
||||
}
|
||||
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user