diff --git a/src/if-options.c b/src/if-options.c index 7b445f45..0b4d5deb 100644 --- a/src/if-options.c +++ b/src/if-options.c @@ -1126,6 +1126,10 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo, arg = p + 1; s = (ssize_t)sizeof(ifo->vendor) - 1 - ifo->vendor[0] - 2; + if (s < 0) { + logerrx("vendor option list is full"); + return -1; + } if (inet_aton(arg, &addr) == 1) { if (s < 6) { s = -1;