summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@herrb.eu>2023-02-28 14:19:21 +0100
committerMatthieu Herrb <matthieu@herrb.eu>2023-02-28 14:21:07 +0100
commit18e109d755c5ce18157fdabb6de8ee6845b348ff (patch)
tree6d3ffc43a2c976c997265a1db673e37b7249a080
parentfd04ab24a5e99d53874789439d3ffb0eb82574f7 (diff)
downloadxcb-libxcb-18e109d755c5ce18157fdabb6de8ee6845b348ff.tar.gz
Fix xcb_connect() call with a custom xcb_auth_info_t
If the function implementing xcb_connect is called directly with a custom xcb_auth_info_t then checking that the screen in $DISPLAY is valid is skipped. Reported by chohag AT jtan DOT com Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
-rw-r--r--src/xcb_util.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/xcb_util.c b/src/xcb_util.c
index 2121098..30bcf79 100644
--- a/src/xcb_util.c
+++ b/src/xcb_util.c
@@ -532,10 +532,8 @@ xcb_connection_t *xcb_connect_to_display_with_auth_info(const char *displayname,
if(auth) {
c = xcb_connect_to_fd(fd, auth);
- goto out;
}
-
- if(_xcb_get_auth_info(fd, &ourauth, display))
+ else if(_xcb_get_auth_info(fd, &ourauth, display))
{
c = xcb_connect_to_fd(fd, &ourauth);
free(ourauth.name);