--- a/src/libsystemd-network/dhcp6-option.c	2018-11-02 18:46:16.710217740 +0530
+++ b/src/libsystemd-network/dhcp6-option.c	2018-11-02 18:47:19.390217528 +0530
@@ -102,7 +102,7 @@ int dhcp6_option_append_ia(uint8_t **buf
                 return -EINVAL;
         }
 
-        if (*buflen < len)
+        if (*buflen < offsetof(DHCP6Option, data) + len)
                 return -ENOBUFS;
 
         ia_hdr = *buf;