summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Royals <robert.royals@protonmail.com>2024-07-21 22:54:27 +0100
committerRobert Royals <robert.royals@protonmail.com>2024-07-21 22:54:27 +0100
commitedd3f51328df9c621277168c9dd77b1e80ccfd7c (patch)
treece97cc8bcd5c0e7f4202d9148ae40f05a0b22855
parent656d27ed32af4082e8062c1d7c42b65ea3a6b80f (diff)
Fix string length checkHEADmaster
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/19>
-rw-r--r--Xtranssock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Xtranssock.c b/Xtranssock.c
index 9482ecf..ebe45f1 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;