Gentoo Archives: gentoo-commits

From: "Christoph Mende (angelos)" <angelos@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/shout/files: shout-0.8.0-overflow.patch
Date: Sat, 07 May 2011 17:12:31
Message-Id: 20110507171216.A896D20057@flycatcher.gentoo.org
1 angelos 11/05/07 17:12:16
2
3 Added: shout-0.8.0-overflow.patch
4 Log:
5 Fix possible overflows (bug #337527)
6
7 (Portage version: 2.2.0_alpha31/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 net-misc/shout/files/shout-0.8.0-overflow.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/shout/files/shout-0.8.0-overflow.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/shout/files/shout-0.8.0-overflow.patch?rev=1.1&content-type=text/plain
14
15 Index: shout-0.8.0-overflow.patch
16 ===================================================================
17 diff --git a/shout.c b/shout.c
18 index 0a1bded..00bae8d 100644
19 --- a/shout.c
20 +++ b/shout.c
21 @@ -441,7 +441,7 @@ post_config ()
22 perror ("fopen");
23 px_shutdown (44);
24 }
25 - my_snprintf (pid, BUFSIZE, "%d\n", (int) getpid ());
26 + my_snprintf (pid, 30, "%d\n", (int) getpid ());
27 fputs (pid, fp);
28 fclose (fp);
29 }
30 diff --git a/sock.c b/sock.c
31 index 4a67c00..3b4e539 100644
32 --- a/sock.c
33 +++ b/sock.c
34 @@ -81,7 +81,7 @@ sock_connect (char *hostname, int port)
35 sock_close (sockfd);
36 return -1;
37 }
38 - memcpy (&server.sin_addr, &sin.sin_addr, sizeof (sin));
39 + memcpy (&server.sin_addr, &sin.sin_addr, sizeof (sin.sin_addr));
40 } else {
41 host = gethostbyname (hostname);
42 if (host == NULL) {