---
 src/libsystemd-dhcp/sd-dhcp-client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libsystemd-dhcp/sd-dhcp-client.c 
b/src/libsystemd-dhcp/sd-dhcp-client.c
index 3b7b9f4..1fdc01a 100644
--- a/src/libsystemd-dhcp/sd-dhcp-client.c
+++ b/src/libsystemd-dhcp/sd-dhcp-client.c
@@ -775,7 +775,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;
-- 
1.8.5.2

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to