rpms/fakechroot/F-9 fakechroot-2.8-initsocketlen.patch,NONE,1.1

Axel Thimm athimm at fedoraproject.org
Sun Oct 5 11:22:12 UTC 2008


Author: athimm

Update of /cvs/extras/rpms/fakechroot/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21379/F-9

Added Files:
	fakechroot-2.8-initsocketlen.patch 
Log Message:
Fix getpeername/getsockname socklen initialization.

fakechroot-2.8-initsocketlen.patch:

--- NEW FILE fakechroot-2.8-initsocketlen.patch ---
--- fakechroot-2.8/src/libfakechroot.c.init	2008-10-05 10:18:21.000000000 +0200
+++ fakechroot-2.8/src/libfakechroot.c	2008-10-05 10:21:45.000000000 +0200
@@ -1778,7 +1778,8 @@
     char *fakechroot_path, *fakechroot_ptr, fakechroot_buf[FAKECHROOT_MAXPATH];
 
     if (next_getpeername == NULL) fakechroot_init();
-    memset(&newname, 0, sizeof(struct sockaddr_un));
+    newnamelen = sizeof(struct sockaddr_un);
+    memset(&newname, 0, newnamelen);
     status = next_getpeername(s, (struct sockaddr *)&newname, &newnamelen);
     if (status != 0) {
         return status;
@@ -1806,7 +1807,8 @@
     char *fakechroot_path, *fakechroot_ptr, fakechroot_buf[FAKECHROOT_MAXPATH];
 
     if (next_getsockname == NULL) fakechroot_init();
-    memset(&newname, 0, sizeof(struct sockaddr_un));
+    newnamelen = sizeof(struct sockaddr_un);
+    memset(&newname, 0, newnamelen);
     status = next_getsockname(s, (struct sockaddr *)&newname, &newnamelen);
     if (status != 0) {
         return status;




More information about the scm-commits mailing list