diff options
Diffstat (limited to 'src/shared/util.c')
-rw-r--r-- | src/shared/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index 7e17851fcd..75870fcbe2 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -4185,7 +4185,7 @@ int socket_from_display(const char *display, char **path) { k = strspn(display+1, "0123456789"); - f = new(char, sizeof("/tmp/.X11-unix/X") + k); + f = new(char, strlen("/tmp/.X11-unix/X") + k + 1); if (!f) return -ENOMEM; |