[PATCH xserver v4 2/2] randr: Do not update ConnectionInfo if NULL

Olivier Fourdan ofourdan at redhat.com
Thu Jun 2 06:49:45 UTC 2016


Hi all

Humble reminder about this series:

https://patchwork.freedesktop.org/series/7067/

Cheers,
Olivier

----- Original Message -----
> RRScreenSizeNotify() will update the connection information block, but
> if this occurs during initialization before ConnectionInfo is even
> initialized, this will lead to a crash.
> 
> Simply check for ConnectionInfo prior to update it to avoid the crash.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95337
> Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
> ---
>  v2: Move test in RREditConnectionInfo()
>  v3: Copy pasta failed
>  v4: "ranrd" typo in subject
> 
>  randr/rrscreen.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/randr/rrscreen.c b/randr/rrscreen.c
> index d0ca91e..b5e2090 100644
> --- a/randr/rrscreen.c
> +++ b/randr/rrscreen.c
> @@ -41,6 +41,9 @@ RREditConnectionInfo(ScreenPtr pScreen)
>      int screen = 0;
>      int d;
>  
> +    if (ConnectionInfo == NULL)
> +        return;
> +
>      connSetup = (xConnSetup *) ConnectionInfo;
>      vendor = (char *) connSetup + sizeof(xConnSetup);
>      formats = (xPixmapFormat *) ((char *) vendor +
> --
> 2.7.4
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list