[PATCH] Avoid segfaults in XF86VidMode GammaRamp functions if randr_crtc is NULL
Brice Goglin
Brice.Goglin at ens-lyon.org
Tue Feb 23 06:02:40 PST 2010
Keith Packard wrote:
> On Tue, 26 Jan 2010 22:25:04 -0800, Alan Coopersmith <alan.coopersmith at sun.com> wrote:
>
>
>> Fixes crash when xscreensaver tries to use GammaRamp calls to fade out
>> http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6915712
>>
>
> This seems odd to me; how can you have a crtc and no randr_crtc?
>
>
>> @@ -1077,7 +1079,8 @@ xf86GetGammaRampSize(ScreenPtr pScreen)
>> xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
>> RRCrtcPtr crtc = config->output[config->compat_output]->crtc->randr_crtc;
>>
>>
Hello,
I thought this patch would fix all Debian bug reports about crashes in
xf86GetGammaRampSize but it doesn't. All our reports are about ->crtc
being NULL, not about ->crtc->randr_crtc being NULL. So even with your
patch, we still crash in 1.7.5 in the above line (xf86cmap.c:1080) since
we try to dereference a NULL crtc to get the randr_crtc.
See some debugging in
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=554450#31
Does this ring any bell ?
thanks,
Brice
More information about the xorg-devel
mailing list