Minor bug in xcb_connect

Matthieu Herrb matthieu at herrb.eu
Wed Feb 1 10:10:13 UTC 2023


On Tue, Jan 31, 2023 at 10:31:34PM +0000, chohag at jtan.com wrote:
> 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.
> 
> Matthew

Hi,

Thank you for this patch.  Can you also file a Merge Request to
upstream libxcb project at gitlab.freedesktop.org so that this can get
reviewed by libxcb developpers ?

https://gitlab.freedesktop.org/xorg/lib/libxcb/-/merge_requests

Regards, 
> 
> Index: xcb_util.c
> ===================================================================
> RCS file: /src/datum/openbsd/cvs/xenocara/dist/libxcb/src/xcb_util.c,v
> retrieving revision 1.13
> diff -u -p -r1.13 xcb_util.c
> --- xcb_util.c	17 Jul 2022 08:31:10 -0000	1.13
> +++ xcb_util.c	31 Jan 2023 22:20:24 -0000
> @@ -528,10 +528,8 @@ xcb_connection_t *xcb_connect_to_display
>  
>      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);
> 

-- 
Matthieu Herrb


More information about the xorg-devel mailing list