libsystemd-dhcp: DNS name option must be a multiple of 4 bytes

This commit is contained in:
Patrik Flykt
2014-01-31 12:04:51 +01:00
committed by Tom Gundersen
parent 29804cc1e0
commit 74e22380ed
+1 -1
View File
@@ -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;