libsystemd-dhcp: DNS name option must be a multiple of 4 bytes
This commit is contained in:
committed by
Tom Gundersen
parent
29804cc1e0
commit
74e22380ed
@@ -760,7 +760,7 @@ static int client_parse_offer(uint8_t code, uint8_t len, const uint8_t *option,
|
||||
break;
|
||||
|
||||
case DHCP_OPTION_DOMAIN_NAME_SERVER:
|
||||
if (len >= 4) {
|
||||
if (len && !(len % 4)) {
|
||||
unsigned i;
|
||||
|
||||
lease->dns_size = len / 4;
|
||||
|
||||
Reference in New Issue
Block a user