Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > 3ef1bb97727474d5495df75ba190807d > files > 1

socat-1.7.1.3-2.1.mga1.src.rpm

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);
    }