Changeset View
Changeset View
Standalone View
Standalone View
dns/dnsmasq/files/patch-src_option.c
- This file was added.
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
--- src/option.c.orig 2015-07-30 19:59:07 UTC | |||||
+++ src/option.c | |||||
@@ -1501,10 +1501,16 @@ static int one_opt(int option, char *arg | |||||
li = opt_malloc(sizeof(struct list)); | |||||
if (*arg == '*') | |||||
{ | |||||
- li->next = match_suffix; | |||||
- match_suffix = li; | |||||
- /* Have to copy: buffer is overwritten */ | |||||
- li->suffix = opt_string_alloc(arg+1); | |||||
+ /* "*" with no suffix is a no-op */ | |||||
+ if (arg[1] == 0) | |||||
+ free(li); | |||||
+ else | |||||
+ { | |||||
+ li->next = match_suffix; | |||||
+ match_suffix = li; | |||||
+ /* Have to copy: buffer is overwritten */ | |||||
+ li->suffix = opt_string_alloc(arg+1); | |||||
+ } | |||||
} | |||||
else | |||||
{ |