[openssh-commits] [openssh] 01/02: upstream: Make the display number check relative to
git+noreply at mindrot.org
git+noreply at mindrot.org
Sat May 24 19:06:00 AEST 2025
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit a356d978e30dd9870c0b3a7d8edca535b0cd2809
Author: dtucker at openbsd.org <dtucker at openbsd.org>
AuthorDate: Sat May 24 08:09:32 2025 +0000
upstream: Make the display number check relative to
X11DisplayOffset.
This will allows people to use X11DisplayOffset to configure much higher
port ranges if they really want, while not changing the default behaviour.
Patch from Roman Gubarev via github PR#559, ok djm@
OpenBSD-Commit-ID: e0926af5dc0c11e364452b624c3ad0cda88550b5
---
channels.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/channels.c b/channels.c
index bfe2e3b2d..5d503025f 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.442 2024/12/05 06:49:26 dtucker Exp $ */
+/* $OpenBSD: channels.c,v 1.443 2025/05/24 08:09:32 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -5010,7 +5010,7 @@ x11_create_display_inet(struct ssh *ssh, int x11_display_offset,
return -1;
for (display_number = x11_display_offset;
- display_number < MAX_DISPLAYS;
+ display_number < x11_display_offset + MAX_DISPLAYS;
display_number++) {
port = X11_BASE_PORT + display_number;
memset(&hints, 0, sizeof(hints));
@@ -5065,7 +5065,7 @@ x11_create_display_inet(struct ssh *ssh, int x11_display_offset,
if (num_socks > 0)
break;
}
- if (display_number >= MAX_DISPLAYS) {
+ if (display_number >= x11_display_offset + MAX_DISPLAYS) {
error("Failed to allocate internet-domain X11 display socket.");
return -1;
}
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list