[PATCH] Fix null pointer dereference in xf86_reload_cursors().

Julien Cristau jcristau at debian.org
Tue May 11 07:14:44 PDT 2010


Keith,

can you pick up this patch?

Thanks,
Julien

On Fri, Mar  5, 2010 at 15:01:12 +0100, Matthias Hopf wrote:

> On Mar 01, 10 02:11:36 +0100, Cyril Brulebois wrote:
> > Upon resume, X may try to dereference a null pointer, which has been
> > reported in Debian bug #507916 (http://bugs.debian.org/507916).
> > 
> > Jim Paris came up with a patch which solves the problem for him. Here's
> > a (hopefully) fixed version of his patch (without the typo).
> > 
> > Cc: Jim Paris <jim at jtan.com>
> > Signed-off-by: Cyril Brulebois <kibi at debian.org>
> > ---
> >  hw/xfree86/modes/xf86Cursors.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
> > index 385848b..d6e747f 100644
> > --- a/hw/xfree86/modes/xf86Cursors.c
> > +++ b/hw/xfree86/modes/xf86Cursors.c
> > @@ -611,7 +611,7 @@ xf86_reload_cursors (ScreenPtr screen)
> >      cursor_screen_priv = dixLookupPrivate(&screen->devPrivates,
> >  					  xf86CursorScreenKey);
> >      /* return if HW cursor is inactive, to avoid displaying two cursors */
> > -    if (!cursor_screen_priv->isUp)
> > +    if (!cursor_screen_priv || !cursor_screen_priv->isUp)
> >  	return;
> >  
> >      scrn = xf86Screens[screen->myNum];
> > -- 
> > 1.7.0
> 
> Reviewed-By: Matthias Hopf <mhopf at suse.de>
> 
> Matthias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100511/deb880da/attachment.pgp>


More information about the xorg-devel mailing list