summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Mende <angelos@gentoo.org>2011-05-07 17:12:16 +0000
committerChristoph Mende <angelos@gentoo.org>2011-05-07 17:12:16 +0000
commita20d41909e8e6272b5321936b603fb66f086aac6 (patch)
tree1da001f4bd462b938c5c323629b0c3490834f099 /net-misc/shout/files
parentFix typo (diff)
downloadgentoo-2-a20d41909e8e6272b5321936b603fb66f086aac6.tar.gz
gentoo-2-a20d41909e8e6272b5321936b603fb66f086aac6.tar.bz2
gentoo-2-a20d41909e8e6272b5321936b603fb66f086aac6.zip
Fix possible overflows (bug #337527)
(Portage version: 2.2.0_alpha31/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/shout/files')
-rw-r--r--net-misc/shout/files/shout-0.8.0-overflow.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/net-misc/shout/files/shout-0.8.0-overflow.patch b/net-misc/shout/files/shout-0.8.0-overflow.patch
new file mode 100644
index 000000000000..a1292423ce4b
--- /dev/null
+++ b/net-misc/shout/files/shout-0.8.0-overflow.patch
@@ -0,0 +1,26 @@
+diff --git a/shout.c b/shout.c
+index 0a1bded..00bae8d 100644
+--- a/shout.c
++++ b/shout.c
+@@ -441,7 +441,7 @@ post_config ()
+ perror ("fopen");
+ px_shutdown (44);
+ }
+- my_snprintf (pid, BUFSIZE, "%d\n", (int) getpid ());
++ my_snprintf (pid, 30, "%d\n", (int) getpid ());
+ fputs (pid, fp);
+ fclose (fp);
+ }
+diff --git a/sock.c b/sock.c
+index 4a67c00..3b4e539 100644
+--- a/sock.c
++++ b/sock.c
+@@ -81,7 +81,7 @@ sock_connect (char *hostname, int port)
+ sock_close (sockfd);
+ return -1;
+ }
+- memcpy (&server.sin_addr, &sin.sin_addr, sizeof (sin));
++ memcpy (&server.sin_addr, &sin.sin_addr, sizeof (sin.sin_addr));
+ } else {
+ host = gethostbyname (hostname);
+ if (host == NULL) {