From 9e732445cfde9f6fc9574b2f36da15f294ac3177 Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Thu, 12 Dec 2019 20:56:08 +0000 Subject: [PATCH] Fix crash in DHCP option parsing. Thanks to Klaus Eisentraut for finding this. --- src/option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/option.c b/src/option.c index 0e9b305..70a6517 100644 --- a/src/option.c +++ b/src/option.c @@ -1469,7 +1469,7 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags) } /* RFC 3361, enc byte is zero for names */ - if (new->opt == OPTION_SIP_SERVER) + if (new->opt == OPTION_SIP_SERVER && m) m[0] = 0; new->len = (int) len + header_size; new->val = m;