aboutsummaryrefslogtreecommitdiffstats
path: root/dns/dnsmasq/files
diff options
context:
space:
mode:
authormandree <mandree@FreeBSD.org>2016-01-08 07:44:00 +0800
committermandree <mandree@FreeBSD.org>2016-01-08 07:44:00 +0800
commit89def15ad0d7e00f0d64beef07863fe6ac2a11fe (patch)
tree84f58016e1cfaf7e9cfd29e6c2a3b6d7be136dd0 /dns/dnsmasq/files
parentd0d896b800e0036d190d13d39b1aafa4133087bb (diff)
downloadfreebsd-ports-gnome-89def15ad0d7e00f0d64beef07863fe6ac2a11fe.tar.gz
freebsd-ports-gnome-89def15ad0d7e00f0d64beef07863fe6ac2a11fe.tar.zst
freebsd-ports-gnome-89def15ad0d7e00f0d64beef07863fe6ac2a11fe.zip
Cherry-pick two upstream fixes for crashers.
(But bump PORTREVISION instead of PORTEPOCH ;-)) http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=0007ee90646a5a78a96ee729932e89d31c69513a http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=41a8d9e99be9f2cc8b02051dd322cb45e0faac87 Submitted by: garga@ Obtained from: Edwin Török, Simon Kelley Differential Revision: D4813
Diffstat (limited to 'dns/dnsmasq/files')
-rw-r--r--dns/dnsmasq/files/patch-src_cache.c11
-rw-r--r--dns/dnsmasq/files/patch-src_option.c23
2 files changed, 34 insertions, 0 deletions
diff --git a/dns/dnsmasq/files/patch-src_cache.c b/dns/dnsmasq/files/patch-src_cache.c
new file mode 100644
index 000000000000..2c0b026a0712
--- /dev/null
+++ b/dns/dnsmasq/files/patch-src_cache.c
@@ -0,0 +1,11 @@
+--- src/cache.c.orig 2015-07-30 19:59:07 UTC
++++ src/cache.c
+@@ -481,7 +481,7 @@ struct crec *cache_insert(char *name, st
+ existing record is for an A or AAAA and
+ the record we're trying to insert is the same,
+ just drop the insert, but don't error the whole process. */
+- if ((flags & (F_IPV4 | F_IPV6)) && (flags & F_FORWARD))
++ if ((flags & (F_IPV4 | F_IPV6)) && (flags & F_FORWARD) && addr)
+ {
+ if ((flags & F_IPV4) && (new->flags & F_IPV4) &&
+ new->addr.addr.addr.addr4.s_addr == addr->addr.addr4.s_addr)
diff --git a/dns/dnsmasq/files/patch-src_option.c b/dns/dnsmasq/files/patch-src_option.c
new file mode 100644
index 000000000000..91cbd33d4a6d
--- /dev/null
+++ b/dns/dnsmasq/files/patch-src_option.c
@@ -0,0 +1,23 @@
+--- 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
+ {