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>
This commit is contained in:
Matthieu Herrb 2023-02-28 14:19:21 +01:00
parent fd04ab24a5
commit 18e109d755

View File

@ -532,10 +532,8 @@ xcb_connection_t *xcb_connect_to_display_with_auth_info(const char *displayname,
if(auth) { if(auth) {
c = xcb_connect_to_fd(fd, auth); c = xcb_connect_to_fd(fd, auth);
goto out;
} }
else if(_xcb_get_auth_info(fd, &ourauth, display))
if(_xcb_get_auth_info(fd, &ourauth, display))
{ {
c = xcb_connect_to_fd(fd, &ourauth); c = xcb_connect_to_fd(fd, &ourauth);
free(ourauth.name); free(ourauth.name);