diff options
author | Julian Orth <ju.orth@gmail.com> | 2022-10-16 21:43:26 +0200 |
---|---|---|
committer | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2022-12-29 21:05:26 +0000 |
commit | 762096628c69867f24bd0676520b7f3a811c6072 (patch) | |
tree | e86975edededddd41907b5f6f0c110f8cdc6b38b | |
parent | 87e5db75fb4f004d9cf25a6f335ddb8722b9c467 (diff) | |
download | xserver-762096628c69867f24bd0676520b7f3a811c6072.tar.gz |
os/connection: don't leave `port` uninitialized
If DISPLAY is set but does not start with `/`, `port` is now
initialized.
Fixes 83d0d911069d502232d719882cd1c5cd090defa1
-rw-r--r-- | os/connection.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/os/connection.c b/os/connection.c index 55f1cd32e..1d92b6013 100644 --- a/os/connection.c +++ b/os/connection.c @@ -1018,7 +1018,7 @@ ListenOnOpenFD(int fd, int noxauth) } } - if (!display_env) { + if (!display_env || display_env[0] != '/') { /* Just some default so things don't break and die. */ snprintf(port, sizeof(port), ":%d", atoi(display)); } |