Gentoo Archives: gentoo-commits

From: "Jeroen Roovers (jer)" <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/fwlogwatch/files: fwlogwatch-1.2-overflow.patch
Date: Mon, 01 Aug 2011 02:31:44
Message-Id: 20110801023127.C6E4220054@flycatcher.gentoo.org
1 jer 11/08/01 02:31:27
2
3 Added: fwlogwatch-1.2-overflow.patch
4 Log:
5 Fix buffer overflow (bug #337415).
6
7 (Portage version: 2.2.0_alpha49/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 net-analyzer/fwlogwatch/files/fwlogwatch-1.2-overflow.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/fwlogwatch/files/fwlogwatch-1.2-overflow.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/fwlogwatch/files/fwlogwatch-1.2-overflow.patch?rev=1.1&content-type=text/plain
14
15 Index: fwlogwatch-1.2-overflow.patch
16 ===================================================================
17 --- a/response.c
18 +++ b/response.c
19 @@ -117,32 +117,32 @@
20 }
21
22 snprintf(buf2, BUFSIZE, " %d %s", this_host->count, inet_ntoa(this_host->shost));
23 - strncat(buf, buf2, BUFSIZE);
24 + strncat(buf, buf2, BUFSIZE -1);
25
26 if (opt.dst_ip) {
27 snprintf(buf2, BUFSIZE, " %s", inet_ntoa(this_host->dhost));
28 - strncat(buf, buf2, BUFSIZE);
29 + strncat(buf, buf2, BUFSIZE -1);
30 } else {
31 strncat(buf, " -", BUFSIZE);
32 }
33
34 if (opt.proto) {
35 snprintf(buf2, BUFSIZE, " %d", this_host->protocol);
36 - strncat(buf, buf2, BUFSIZE);
37 + strncat(buf, buf2, BUFSIZE -1);
38 } else {
39 strncat(buf, " -", BUFSIZE);
40 }
41
42 if (opt.src_port) {
43 snprintf(buf2, BUFSIZE, " %d", this_host->sport);
44 - strncat(buf, buf2, BUFSIZE);
45 + strncat(buf, buf2, BUFSIZE -1);
46 } else {
47 strncat(buf, " -", BUFSIZE);
48 }
49
50 if (opt.dst_port) {
51 snprintf(buf2, BUFSIZE, " %d", this_host->dport);
52 - strncat(buf, buf2, BUFSIZE);
53 + strncat(buf, buf2, BUFSIZE -1);
54 } else {
55 strncat(buf, " -", BUFSIZE);
56 }