Permalink
Browse files

dhcp6: make sure we have enough space for the DHCP6 option header

  • Loading branch information...
poettering committed Oct 19, 2018
1 parent 3941f83 commit 49653743f69658aeeebdb14faf1ab158f1f2cb20
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/libsystemd-network/dhcp6-option.c
@@ -106,7 +106,7 @@ int dhcp6_option_append_ia(uint8_t **buf, size_t *buflen, const DHCP6IA *ia) {
return -EINVAL;
}
if (*buflen < len)
if (*buflen < offsetof(DHCP6Option, data) + len)
return -ENOBUFS;
ia_hdr = *buf;

0 comments on commit 4965374

Please sign in to comment.