Marcus Meissner 2011-02-02 17:24:39 +00:00 committed by Git OBS Bridge
parent 47e04bba61
commit 46c011690b

21
socat-unixsalen.patch Normal file
View File

@ -0,0 +1,21 @@
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);
}