Fix a rare configuration-dependent crash. Simon Kelley, upstream

maintainer, wrote in message <4F70361B.7080306@thekelleys.org.uk>:

    A bug has been found in dnsmasq 2.60 that can cause crashes. This is
    configuration dependent: it either crashes frequently or not at all.
    The configuration required is one which allows dnsmasq to receive
    DHCPINFORM requests for which there is no valid dhcp-range. This is
    rare.

Adding the patch he offers for download.

Feature safe: yes
This commit is contained in:
Matthias Andree 2012-04-01 11:18:18 +00:00
parent 1dddf0db6e
commit 34c815a522
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=294075
2 changed files with 13 additions and 0 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= dnsmasq PORTNAME= dnsmasq
DISTVERSION= 2.60 DISTVERSION= 2.60
PORTREVISION= 1
PORTEPOCH= 1 PORTEPOCH= 1
CATEGORIES= dns ipv6 CATEGORIES= dns ipv6
MASTER_SITES= http://www.thekelleys.org.uk/dnsmasq/ \ MASTER_SITES= http://www.thekelleys.org.uk/dnsmasq/ \

View file

@ -0,0 +1,12 @@
--- ./src/rfc2131.c.orig 2012-03-04 21:04:22.000000000 +0100
+++ ./src/rfc2131.c 2012-04-01 13:14:33.000000000 +0200
@@ -2095,7 +2095,8 @@
struct dhcp_netid_list *id_list;
/* filter options based on tags, those we want get DHOPT_TAGOK bit set */
- context->netid.next = NULL;
+ if (context)
+ context->netid.next = NULL;
tagif = option_filter(netid, context && context->netid.net ? &context->netid : NULL, config_opts);
/* logging */