summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@herrb.eu>2024-08-02 08:58:42 +0200
committerMatthieu Herrb <matthieu@herrb.eu>2024-08-02 08:58:42 +0200
commit45a023d7b210a67a19ad662c9cc9b006d79a5080 (patch)
tree8bd0f5b10599a8e30fb9cf6e2be6e6550a612f39
parentea7116003a79a774786ce833de77496b05e136e2 (diff)
parentedd3f51328df9c621277168c9dd77b1e80ccfd7c (diff)
Merge remote-tracking branch 'origin/master' into obsdobsd
-rw-r--r--Xtranssock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Xtranssock.c b/Xtranssock.c
index 4dca2d6..ad6a1f0 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -748,7 +748,7 @@ set_sun_path(const char *port, const char *upath, char *path, int abstract)
if (*port == '/') /* a full pathname */
upath = "";
- if (strlen(port) + strlen(upath) > maxlen)
+ if (strlen(at) + strlen(upath) + strlen(port) > maxlen)
return -1;
snprintf(path, sizeof(s.sun_path), "%s%s%s", at, upath, port);
return 0;