aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshish SHUKLA <ashish@FreeBSD.org>2010-07-07 07:09:33 +0000
committerAshish SHUKLA <ashish@FreeBSD.org>2010-07-07 07:09:33 +0000
commitb9d19e1d7aeb303a905a53cb8cf7bd590747f466 (patch)
tree1b1fed0192a0c265ec7f4c606589008a9f90ebca
parentd890d8fdca7918f98692eadf1036c2e9a268aa12 (diff)
downloadports-b9d19e1d7aeb303a905a53cb8cf7bd590747f466.tar.gz
ports-b9d19e1d7aeb303a905a53cb8cf7bd590747f466.zip
- Add patch to fix the issue mentioned in the PR.
- Transfer maintainership to self. PR: ports/147492 Approved by: pgj (mentor), henry.hu.sh@gmail.com (maintainer) Feature safe: yes
Notes
Notes: svn path=/head/; revision=257479
-rw-r--r--textproc/scim-bridge-qt4/Makefile2
-rw-r--r--textproc/scim-bridge-qt4/files/patch-agent_scim-bridge-agent-accept-listener.cpp29
-rw-r--r--textproc/scim-bridge/Makefile2
-rw-r--r--textproc/scim-bridge/files/patch-agent_scim-bridge-agent-accept-listener.cpp29
4 files changed, 60 insertions, 2 deletions
diff --git a/textproc/scim-bridge-qt4/Makefile b/textproc/scim-bridge-qt4/Makefile
index a3d3b97e6727..dabe1e93090e 100644
--- a/textproc/scim-bridge-qt4/Makefile
+++ b/textproc/scim-bridge-qt4/Makefile
@@ -12,7 +12,7 @@ CATEGORIES= textproc
MASTER_SITES= SF/scim/${PORTNAME}/${PORTVERSION}
PKGNAMESUFFIX= -qt4
-MAINTAINER= henry.hu.sh@gmail.com
+MAINTAINER= ashish@FreeBSD.org
COMMENT= Qt4 client for Scim-bridge
RUN_DEPENDS= scim-bridge:${PORTSDIR}/textproc/scim-bridge
diff --git a/textproc/scim-bridge-qt4/files/patch-agent_scim-bridge-agent-accept-listener.cpp b/textproc/scim-bridge-qt4/files/patch-agent_scim-bridge-agent-accept-listener.cpp
new file mode 100644
index 000000000000..4465c0e7f131
--- /dev/null
+++ b/textproc/scim-bridge-qt4/files/patch-agent_scim-bridge-agent-accept-listener.cpp
@@ -0,0 +1,29 @@
+
+$FreeBSD$
+
+--- agent/scim-bridge-agent-accept-listener.cpp.orig
++++ agent/scim-bridge-agent-accept-listener.cpp
+@@ -106,12 +106,12 @@
+ struct sockaddr_un socket_addr;
+ memset (&socket_addr, 0, sizeof (struct sockaddr_un));
+ socket_addr.sun_family = AF_UNIX;
+- strcpy (socket_addr.sun_path, socket_path);
++ strncpy (socket_addr.sun_path, socket_path, 104); /* 104 is the maximum length of sun_path in FreeBSD */
+
+ const int MAX_TRIAL = 5;
+ for (int i = 0; i < MAX_TRIAL; ++i) {
+ scim_bridge_pdebugln (8, "Pinging for the another agent process...");
+- if (connect (socket_fd, (struct sockaddr*)&socket_addr, sizeof (socket_addr.sun_family) + strlen (socket_addr.sun_path))) {
++ if (connect (socket_fd, (struct sockaddr*)&socket_addr, SUN_LEN(&socket_addr))) {
+ if (i == MAX_TRIAL - 1) {
+ scim_bridge_pdebugln (6, "It seems like there is no other agent for the old socket.");
+ break;
+@@ -163,7 +163,7 @@
+ return RETVAL_FAILED;
+ }
+
+- if (bind (socket_fd, (struct sockaddr*)&socket_addr, strlen (socket_addr.sun_path) + sizeof (socket_addr.sun_family)) != 0) {
++ if (bind (socket_fd, (struct sockaddr*)&socket_addr, SUN_LEN(&socket_addr)) != 0) {
+ scim_bridge_perrorln ("Cannot bind the socket: %s", strerror (errno));
+ close (socket_fd);
+ socket_fd = -1;
diff --git a/textproc/scim-bridge/Makefile b/textproc/scim-bridge/Makefile
index a7cc91c4b6cd..06168cea8113 100644
--- a/textproc/scim-bridge/Makefile
+++ b/textproc/scim-bridge/Makefile
@@ -11,7 +11,7 @@ PORTREVISION= 4
CATEGORIES= textproc
MASTER_SITES= SF/scim/${PORTNAME}/${PORTVERSION}
-MAINTAINER= henry.hu.sh@gmail.com
+MAINTAINER= ashish@FreeBSD.org
COMMENT= Scim-bridge agent (server)
LIB_DEPENDS= scim-1.0.10:${PORTSDIR}/textproc/scim
diff --git a/textproc/scim-bridge/files/patch-agent_scim-bridge-agent-accept-listener.cpp b/textproc/scim-bridge/files/patch-agent_scim-bridge-agent-accept-listener.cpp
new file mode 100644
index 000000000000..4465c0e7f131
--- /dev/null
+++ b/textproc/scim-bridge/files/patch-agent_scim-bridge-agent-accept-listener.cpp
@@ -0,0 +1,29 @@
+
+$FreeBSD$
+
+--- agent/scim-bridge-agent-accept-listener.cpp.orig
++++ agent/scim-bridge-agent-accept-listener.cpp
+@@ -106,12 +106,12 @@
+ struct sockaddr_un socket_addr;
+ memset (&socket_addr, 0, sizeof (struct sockaddr_un));
+ socket_addr.sun_family = AF_UNIX;
+- strcpy (socket_addr.sun_path, socket_path);
++ strncpy (socket_addr.sun_path, socket_path, 104); /* 104 is the maximum length of sun_path in FreeBSD */
+
+ const int MAX_TRIAL = 5;
+ for (int i = 0; i < MAX_TRIAL; ++i) {
+ scim_bridge_pdebugln (8, "Pinging for the another agent process...");
+- if (connect (socket_fd, (struct sockaddr*)&socket_addr, sizeof (socket_addr.sun_family) + strlen (socket_addr.sun_path))) {
++ if (connect (socket_fd, (struct sockaddr*)&socket_addr, SUN_LEN(&socket_addr))) {
+ if (i == MAX_TRIAL - 1) {
+ scim_bridge_pdebugln (6, "It seems like there is no other agent for the old socket.");
+ break;
+@@ -163,7 +163,7 @@
+ return RETVAL_FAILED;
+ }
+
+- if (bind (socket_fd, (struct sockaddr*)&socket_addr, strlen (socket_addr.sun_path) + sizeof (socket_addr.sun_family)) != 0) {
++ if (bind (socket_fd, (struct sockaddr*)&socket_addr, SUN_LEN(&socket_addr)) != 0) {
+ scim_bridge_perrorln ("Cannot bind the socket: %s", strerror (errno));
+ close (socket_fd);
+ socket_fd = -1;