From 57b278f88622a90f99cf3ef36bc475460d2895f1 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Mon, 31 Aug 2020 15:55:29 +0000 Subject: [PATCH] dhclient: improve error handling parsing option 119 Reported by: Shlomi Oberman, JSOF Submitted by: delphij Reviewed by: markj Tested by: markj --- sbin/dhclient/options.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/dhclient/options.c b/sbin/dhclient/options.c index dc4cceab841..afdb3985aa5 100644 --- a/sbin/dhclient/options.c +++ b/sbin/dhclient/options.c @@ -298,6 +298,8 @@ find_search_domain_name_len(struct option_data *option, size_t *offset) pointed_len = find_search_domain_name_len(option, &pointer); + if (pointed_len < 0) + return (-1); domain_name_len += pointed_len; *offset = i + 2;