1
diff -urN old/iptables-1.2.9/extensions/libip6t_owner.c new/iptables-1.2.9/extensions/libip6t_owner.c
2
--- old/iptables-1.2.9/extensions/libip6t_owner.c 2003-06-30 12:16:54.000000000 -0400
3
+++ new/iptables-1.2.9/extensions/libip6t_owner.c 2004-02-22 16:29:59.000000000 -0500
5
exit_error(PARAMETER_PROBLEM, "OWNER CMD `%s' too long, max %d characters", optarg, sizeof(ownerinfo->comm));
7
strncpy(ownerinfo->comm, optarg, sizeof(ownerinfo->comm));
8
+ ownerinfo->comm[sizeof(ownerinfo->comm)-1] = '\0';
11
ownerinfo->invert |= IP6T_OWNER_COMM;
12
--- old/iptables-1.2.9/extensions/libipt_XOR.c 2003-05-31 13:11:49.000000000 -0400
13
+++ new/iptables-1.2.9/extensions/libipt_XOR.c 2004-02-22 16:29:59.000000000 -0500
17
strncpy(info->key, optarg, 30);
18
+ info->key[29] = '\0';
19
*flags |= IPT_KEY_SET;
22
--- old/iptables-1.2.9/extensions/libipt_helper.c 2003-03-05 02:26:13.000000000 -0500
23
+++ new/iptables-1.2.9/extensions/libipt_helper.c 2004-02-22 16:29:59.000000000 -0500
26
check_inverse(optarg, &invert, &invert, 0);
27
strncpy(info->name, optarg, 29);
28
+ info->name[29] = '\0';
32
--- old/iptables-1.2.9/extensions/libipt_owner.c 2003-05-03 14:52:15.000000000 -0400
33
+++ new/iptables-1.2.9/extensions/libipt_owner.c 2004-02-22 16:29:59.000000000 -0500
35
exit_error(PARAMETER_PROBLEM, "OWNER CMD `%s' too long, max %d characters", optarg, sizeof(ownerinfo->comm));
37
strncpy(ownerinfo->comm, optarg, sizeof(ownerinfo->comm));
38
+ ownerinfo->comm[sizeof(ownerinfo->comm)-1] = '\0';
41
ownerinfo->invert |= IPT_OWNER_COMM;
42
--- old/iptables-1.2.9/extensions/libipt_recent.c 2003-06-14 18:39:35.000000000 -0400
43
+++ new/iptables-1.2.9/extensions/libipt_recent.c 2004-02-22 16:29:59.000000000 -0500
45
*nfcache |= NFC_UNKNOWN;
47
strncpy(info->name,"DEFAULT",IPT_RECENT_NAME_LEN);
48
+ /* eventhough IPT_RECENT_NAME_LEN is currently defined as 200,
49
+ * better be safe, than sorry */
50
+ info->name[IPT_RECENT_NAME_LEN-1] = '\0';
51
info->side = IPT_RECENT_SOURCE;
57
strncpy(info->name,optarg,IPT_RECENT_NAME_LEN);
58
+ info->name[IPT_RECENT_NAME_LEN-1] = '\0';
62
--- old/iptables-1.2.9/ip6tables-restore.c 2003-05-03 14:52:13.000000000 -0400
63
+++ new/iptables-1.2.9/ip6tables-restore.c 2004-02-22 16:29:59.000000000 -0500
67
strncpy(curtable, table, IP6T_TABLE_MAXNAMELEN);
68
+ curtable[IP6T_TABLE_MAXNAMELEN] = '\0';
72
--- old/iptables-1.2.9/ip6tables.c 2004-02-22 16:29:21.000000000 -0500
73
+++ new/iptables-1.2.9/ip6tables.c 2004-02-22 16:29:59.000000000 -0500
77
strncpy(buf, name, sizeof(buf) - 1);
78
+ buf[sizeof(buf) - 1] = '\0';
79
if ((p = strrchr(buf, '/')) != NULL) {
81
addrp = parse_mask(p + 1);
82
diff -urN old/iptables-1.2.9/iptables-restore.c new/iptables-1.2.9/iptables-restore.c
83
--- old/iptables-1.2.9/iptables-restore.c 2003-05-03 14:52:13.000000000 -0400
84
+++ new/iptables-1.2.9/iptables-restore.c 2004-02-22 16:29:59.000000000 -0500
88
strncpy(curtable, table, IPT_TABLE_MAXNAMELEN);
89
+ curtable[IPT_TABLE_MAXNAMELEN] = '\0';
93
--- old/iptables-1.2.9/iptables.c 2004-02-22 16:29:21.000000000 -0500
94
+++ new/iptables-1.2.9/iptables.c 2004-02-22 16:29:59.000000000 -0500
97
/* copy dotted string, because we need to modify it */
98
strncpy(buf, dotted, sizeof(buf) - 1);
99
+ buf[sizeof(buf) - 1] = '\0';
100
addrp = (unsigned char *) &(addr.s_addr);
106
strncpy(buf, name, sizeof(buf) - 1);
107
+ buf[sizeof(buf) - 1] = '\0';
108
if ((p = strrchr(buf, '/')) != NULL) {
110
addrp = parse_mask(p + 1);
111
--- old/iptables-1.2.9/libiptc/libiptc.c 2003-07-05 16:11:11.000000000 -0400
112
+++ new/iptables-1.2.9/libiptc/libiptc.c 2004-02-22 16:29:59.000000000 -0500
114
h->cache_num_chains++;
116
strncpy(newcc->name, name, TABLE_MAXNAMELEN-1);
117
+ newcc->name[TABLE_MAXNAMELEN-1] = '\0';
118
newcc->start_off = start_off;
119
newcc->end_off = end_off;