From: David Hankins Date: Fri, 20 Feb 2009 00:09:24 +0000 (+0000) Subject: - Two uninitialized stack structures are now memset to zero. [ISC-Bugs #17737] X-Git-Tag: v4_2_0a1~96 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=819186b746c2cfbd311cdc02d0b4c53453d2dd84;p=thirdparty%2Fdhcp.git - Two uninitialized stack structures are now memset to zero. [ISC-Bugs #17737] --- diff --git a/RELNOTES b/RELNOTES index 50064319f..502f365dc 100644 --- a/RELNOTES +++ b/RELNOTES @@ -70,6 +70,8 @@ work on other platforms. Please report any problems and suggested fixes to - Fix a build error in dhcrelay, using older versions of gcc with dhcpv6 disabled. +- Two uninitialized stack structures are now memset to zero. + Changes since 4.1.0b1 - A missing "else" in dhcrelay.c could have caused an interface not to diff --git a/common/lpf.c b/common/lpf.c index 5dda6fa51..2269f0194 100644 --- a/common/lpf.c +++ b/common/lpf.c @@ -4,7 +4,7 @@ Support Services in Vancouver, B.C. */ /* - * Copyright (c) 2004,2007 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1996-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any @@ -248,6 +248,8 @@ static void lpf_tr_filter_setup (info) { struct sock_fprog p; + memset(&p, 0, sizeof(p)); + /* Set up the bpf filter program structure. This is defined in bpf.c */ p.len = dhcp_bpf_tr_filter_len; diff --git a/common/packet.c b/common/packet.c index 3e1c91b44..67365f797 100644 --- a/common/packet.c +++ b/common/packet.c @@ -3,7 +3,7 @@ Packet assembly code, originally contributed by Archie Cobbs. */ /* - * Copyright (c) 2004,2005,2007 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2004,2005,2007,2009 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1996-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any @@ -135,6 +135,8 @@ void assemble_udp_ip_header (interface, buf, bufix, struct ip ip; struct udphdr udp; + memset (&ip, 0, sizeof ip); + /* Fill out the IP header */ IP_V_SET (&ip, 4); IP_HL_SET (&ip, 20);