From 0c38719fe02beea2b58bed38fdd98a8d1af98120 Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Thu, 5 Sep 2013 10:21:12 +0100 Subject: [PATCH] Don't crash with empty tag: in dhcp-range. --- src/option.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/option.c b/src/option.c index b12ca39..74f3110 100644 --- a/src/option.c +++ b/src/option.c @@ -2337,7 +2337,9 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma struct dhcp_netid *tt = opt_malloc(sizeof (struct dhcp_netid)); tt->net = opt_string_alloc(arg+4); tt->next = new->filter; - new->filter = tt; + /* ignore empty tag */ + if (tt->net) + new->filter = tt; } else {