rpms/openssh/devel openssh-5.5p1-x11.patch,1.2,1.3
Jan F. Chadima
jfch2222 at fedoraproject.org
Wed Jun 30 14:45:31 UTC 2010
- Previous message: rpms/lvm2/devel LVM2.2.02.69.tgz.asc, NONE, 1.1 .cvsignore, 1.87, 1.88 lvm2.spec, 1.214, 1.215 sources, 1.97, 1.98 upstream, 1.80, 1.81 LVM2.2.02.68.tgz.asc, 1.1, NONE
- Next message: rpms/eclipse-pydev/F-13 pydev-removeruntimeerror.patch, NONE, 1.1 eclipse-pydev.spec, 1.39, 1.40
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jfch2222
Update of /cvs/pkgs/rpms/openssh/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv6644
Modified Files:
openssh-5.5p1-x11.patch
Log Message:
* Thu Jun 25 2010 Jan F. Chadima <jchadima at redhat.com> - 5.5p1-16 + 0.9.2-26
- improved the x11 patch (#598671)
openssh-5.5p1-x11.patch:
channels.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
Index: openssh-5.5p1-x11.patch
===================================================================
RCS file: /cvs/pkgs/rpms/openssh/devel/openssh-5.5p1-x11.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- openssh-5.5p1-x11.patch 25 Jun 2010 12:08:42 -0000 1.2
+++ openssh-5.5p1-x11.patch 30 Jun 2010 14:45:30 -0000 1.3
@@ -1,21 +1,46 @@
diff -up openssh-5.5p1/channels.c.x11 openssh-5.5p1/channels.c
---- openssh-5.5p1/channels.c.x11 2010-06-25 13:35:44.000000000 +0200
-+++ openssh-5.5p1/channels.c 2010-06-25 13:40:40.000000000 +0200
-@@ -3354,7 +3354,17 @@ static int
+--- openssh-5.5p1/channels.c.x11 2010-06-30 15:22:45.000000000 +0200
++++ openssh-5.5p1/channels.c 2010-06-30 15:27:42.000000000 +0200
+@@ -3332,7 +3332,7 @@ x11_create_display_inet(int x11_display_
+ }
+
+ static int
+-connect_local_xsocket_path(const char *pathname)
++connect_local_xsocket_path(const char *pathname, int len)
+ {
+ int sock;
+ struct sockaddr_un addr;
+@@ -3342,7 +3342,11 @@ connect_local_xsocket_path(const char *p
+ error("socket: %.100s", strerror(errno));
+ memset(&addr, 0, sizeof(addr));
+ addr.sun_family = AF_UNIX;
+- strlcpy(addr.sun_path, pathname, sizeof addr.sun_path);
++ if (len <= 0)
++ return -1;
++ if (len > sizeof addr.sun_path)
++ len = sizeof addr.sun_path;
++ memcpy(addr.sun_path, pathname , len);
+ if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == 0)
+ return sock;
+ close(sock);
+@@ -3354,8 +3358,18 @@ static int
connect_local_xsocket(u_int dnr)
{
char buf[1024];
+- snprintf(buf, sizeof buf, _PATH_UNIX_X, dnr);
+- return connect_local_xsocket_path(buf);
++ int len;
+#ifdef linux
+ int ret;
+#endif
- snprintf(buf, sizeof buf, _PATH_UNIX_X, dnr);
++ len = snprintf(buf + 1, sizeof (buf) - 1, _PATH_UNIX_X, dnr);
+#ifdef linux
+ /* try abstract socket first */
+ buf[0] = '\0';
-+ if ((ret = connect_local_xsocket_path(buf)) >= 0)
++ if ((ret = connect_local_xsocket_path(buf, len + 1)) >= 0)
+ return ret;
-+ buf[0] = '/';
+#endif
- return connect_local_xsocket_path(buf);
++ return connect_local_xsocket_path(buf + 1, len);
}
+ int
- Previous message: rpms/lvm2/devel LVM2.2.02.69.tgz.asc, NONE, 1.1 .cvsignore, 1.87, 1.88 lvm2.spec, 1.214, 1.215 sources, 1.97, 1.98 upstream, 1.80, 1.81 LVM2.2.02.68.tgz.asc, 1.1, NONE
- Next message: rpms/eclipse-pydev/F-13 pydev-removeruntimeerror.patch, NONE, 1.1 eclipse-pydev.spec, 1.39, 1.40
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list