File socat-unixsalen.patch of Package socat.openSUSE_12.1_Update

Index: socat-1.7.1.2/sysutils.c
===================================================================
--- socat-1.7.1.2.orig/sysutils.c
+++ socat-1.7.1.2/sysutils.c
@@ -215,10 +215,14 @@ char *sockaddr_unix_info(const struct so
    } else
 #endif /* WITH_ABSTRACT_UNIXSOCKET */
    {
-      nextc =
-	 sanitize_string(sa->sun_path,
+      if (salen <= XIOUNIXSOCKOVERHEAD) {
+      	nextc = sanitize_string ("<anon>", MIN(UNIX_PATH_MAX, strlen("<anon>")),
+			ubuff, XIOSAN_DEFAULT_BACKSLASH_OCT_3);
+      } else {
+      	nextc = sanitize_string(sa->sun_path,
 			 MIN(UNIX_PATH_MAX, strlen(sa->sun_path)),
 			 ubuff, XIOSAN_DEFAULT_BACKSLASH_OCT_3);
+      }
       *nextc = '\0';
       strncpy(buff, ubuff, blen);
    }
openSUSE Build Service is sponsored by