[71666] trunk/dports/audio/gmpc
raimue at macports.org
raimue at macports.org
Sun Sep 19 10:28:00 PDT 2010
Revision: 71666
http://trac.macports.org/changeset/71666
Author: raimue at macports.org
Date: 2010-09-19 10:27:59 -0700 (Sun, 19 Sep 2010)
Log Message:
-----------
audio/gmpc: Fix buffer overflow in bacon-message-connection.c
Modified Paths:
--------------
trunk/dports/audio/gmpc/Portfile
Added Paths:
-----------
trunk/dports/audio/gmpc/files/
trunk/dports/audio/gmpc/files/patch-bacon-buffer-overflow.diff
Modified: trunk/dports/audio/gmpc/Portfile
===================================================================
--- trunk/dports/audio/gmpc/Portfile 2010-09-19 17:24:23 UTC (rev 71665)
+++ trunk/dports/audio/gmpc/Portfile 2010-09-19 17:27:59 UTC (rev 71666)
@@ -4,7 +4,7 @@
name gmpc
version 0.20.0
-revision 2
+revision 3
categories audio
platforms darwin
maintainers raimue \
@@ -34,6 +34,13 @@
port:curl \
port:libsoup
+patchfiles patch-bacon-buffer-overflow.diff
+
+post-patch {
+ # restore timestamp to avoid rebuilding .vala source files
+ system "cd ${worksrcpath} && touch -r src/bacon/bacon-message-connection.h src/bacon/bacon-message-connection.c"
+}
+
configure.args --disable-macige
variant quartz {
Added: trunk/dports/audio/gmpc/files/patch-bacon-buffer-overflow.diff
===================================================================
--- trunk/dports/audio/gmpc/files/patch-bacon-buffer-overflow.diff (rev 0)
+++ trunk/dports/audio/gmpc/files/patch-bacon-buffer-overflow.diff 2010-09-19 17:27:59 UTC (rev 71666)
@@ -0,0 +1,31 @@
+--- src/bacon/bacon-message-connection.c.orig 2010-09-19 17:31:02.000000000 +0200
++++ src/bacon/bacon-message-connection.c 2010-09-19 17:37:28.000000000 +0200
+@@ -32,10 +32,6 @@
+ #include <gdk/gdk.h>
+ #include "bacon-message-connection.h"
+
+-#ifndef UNIX_PATH_MAX
+-#define UNIX_PATH_MAX 108
+-#endif
+-
+ struct BaconMessageConnection {
+ /* A server accepts connections */
+ gboolean is_server;
+@@ -257,7 +253,7 @@
+
+ uaddr.sun_family = AF_UNIX;
+ strncpy (uaddr.sun_path, conn->path,
+- MIN (strlen(conn->path)+1, UNIX_PATH_MAX));
++ MIN (strlen(conn->path)+1, sizeof(uaddr.sun_path)));
+ conn->fd = socket (PF_UNIX, SOCK_STREAM, 0);
+ if (bind (conn->fd, (struct sockaddr *) &uaddr, sizeof (uaddr)) == -1)
+ {
+@@ -278,7 +274,7 @@
+
+ uaddr.sun_family = AF_UNIX;
+ strncpy (uaddr.sun_path, conn->path,
+- MIN(strlen(conn->path)+1, UNIX_PATH_MAX));
++ MIN(strlen(conn->path)+1, sizeof(uaddr.sun_path)));
+ conn->fd = socket (PF_UNIX, SOCK_STREAM, 0);
+ if (connect (conn->fd, (struct sockaddr *) &uaddr,
+ sizeof (uaddr)) == -1)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100919/b9aeb290/attachment.html>
More information about the macports-changes
mailing list