From: David Hankins Date: Mon, 21 May 2007 22:09:07 +0000 (+0000) Subject: - 'dhcp.c(3953): non-null pointer' has been repaired. This fixes a flaw X-Git-Tag: v4_0_0a2~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e889ded168b9efd9d2f6aa98b312b03a6cdf0878;p=thirdparty%2Fdhcp.git - 'dhcp.c(3953): non-null pointer' has been repaired. This fixes a flaw wherein the DHCPv4 server may use seemingly random source addresses. [ISC-Bugs #16897] --- diff --git a/RELNOTES b/RELNOTES index d6b9ac0f8..c29cdfa5c 100644 --- a/RELNOTES +++ b/RELNOTES @@ -51,6 +51,12 @@ The system has only been tested on Linux, FreeBSD, and Solaris, and may not work on other platforms. Please report any problems and suggested fixes to . + + Changes since 4.0.0a1 + +- 'dhcp.c(3953): non-null pointer' has been repaired. This fixes a flaw + wherein the DHCPv4 server may use seemingly random source addresses. + Changes since 4.0.0-20070413 - Old (expired) leases are now cleaned. diff --git a/server/dhcp.c b/server/dhcp.c index e45c87b8d..9b1fac78e 100644 --- a/server/dhcp.c +++ b/server/dhcp.c @@ -34,7 +34,7 @@ #ifndef lint static char copyright[] = -"$Id: dhcp.c,v 1.219 2007/05/19 19:16:26 dhankins Exp $ Copyright (c) 2004-2007 Internet Systems Consortium. All rights reserved.\n"; +"$Id: dhcp.c,v 1.220 2007/05/21 22:09:07 dhankins Exp $ Copyright (c) 2004-2007 Internet Systems Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -3940,11 +3940,12 @@ void get_server_source_address(struct in_addr *from, struct option_state *options, struct packet *packet) { - int option_num; + unsigned option_num; struct option_cache *oc; - struct data_string d; - struct in_addr *a; - struct option *option; + struct data_string d; + struct in_addr *a; + + memset(&d, 0, sizeof(d)); option_num = DHO_DHCP_SERVER_IDENTIFIER; oc = lookup_option(&dhcp_universe, options, option_num);