ssahani / rpms / dhcp

Forked from rpms/dhcp 5 years ago
Clone
0713d0c
diff -up dhcp-3.0.6/minires/ns_name.c.memory dhcp-3.0.6/minires/ns_name.c
0713d0c
--- dhcp-3.0.6/minires/ns_name.c.memory	2004-06-10 13:59:40.000000000 -0400
0713d0c
+++ dhcp-3.0.6/minires/ns_name.c	2007-07-10 11:43:29.000000000 -0400
0713d0c
@@ -71,6 +71,11 @@ ns_name_ntop(const u_char *src, char *ds
0713d0c
 	dn = dst;
0713d0c
 	eom = dst + dstsiz;
0713d0c
 
0713d0c
+	if (dn >= eom) {
0713d0c
+		errno = EMSGSIZE;
0713d0c
+		return (-1);
0713d0c
+	}
0713d0c
+
0713d0c
 	while ((n = *cp++) != 0) {
0713d0c
 		if ((n & NS_CMPRSFLGS) != 0) {
0713d0c
 			/* Some kind of compression pointer. */
0713d0c
diff -up dhcp-3.0.6/common/packet.c.memory dhcp-3.0.6/common/packet.c
0713d0c
--- dhcp-3.0.6/common/packet.c.memory	2007-05-01 16:42:55.000000000 -0400
0713d0c
+++ dhcp-3.0.6/common/packet.c	2007-07-10 11:43:29.000000000 -0400
0713d0c
@@ -140,6 +140,7 @@ void assemble_udp_ip_header (interface, 
3b727ca
 	struct ip ip;
3b727ca
 	struct udphdr udp;
3b727ca
 
3b727ca
+	memset( &ip, '\0', sizeof ip);
3b727ca
 	/* Fill out the IP header */
3b727ca
 	IP_V_SET (&ip, 4);
3b727ca
 	IP_HL_SET (&ip, 20);
0713d0c
diff -up dhcp-3.0.6/common/lpf.c.memory dhcp-3.0.6/common/lpf.c
0713d0c
--- dhcp-3.0.6/common/lpf.c.memory	2007-07-10 11:43:29.000000000 -0400
0713d0c
+++ dhcp-3.0.6/common/lpf.c	2007-07-10 11:43:29.000000000 -0400
0713d0c
@@ -246,6 +246,7 @@ static void lpf_tr_filter_setup (info)
3b727ca
 	struct interface_info *info;
3b727ca
 {
3b727ca
 	struct sock_fprog p;
3b727ca
+	memset(&p,'\0', sizeof(struct sock_fprog));
3b727ca
 
3b727ca
 	/* Set up the bpf filter program structure.    This is defined in
3b727ca
 	   bpf.c */