On Sat, 2009-11-21 at 22:11 -0800, Vinson Lee wrote: > Module: Mesa > Branch: mesa_7_7_branch > Commit: 88aab56a26dd33a2d3177a41420f00473d7270af > URL: > http://cgit.freedesktop.org/mesa/mesa/commit/?id=88aab56a26dd33a2d3177a41420f00473d7270af > > Author: Vinson Lee <[email protected]> > Date: Sun Nov 22 01:10:38 2009 -0500 > > st/xorg: Prevent potential null pointer deference in xorg_xv.c. > > --- > > src/gallium/state_trackers/xorg/xorg_xv.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/gallium/state_trackers/xorg/xorg_xv.c > b/src/gallium/state_trackers/xorg/xorg_xv.c > index a1e74fa..e7f4900 100644 > --- a/src/gallium/state_trackers/xorg/xorg_xv.c > +++ b/src/gallium/state_trackers/xorg/xorg_xv.c > @@ -446,7 +446,7 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv > *pPriv, int id, > int x, y, w, h; > struct exa_pixmap_priv *dst = exaGetPixmapDriverPrivate(pPixmap); > > - if (!dst->tex) { > + if (dst && !dst->tex) { > xorg_exa_set_shared_usage(pPixmap); > pScrn->pScreen->ModifyPixmapHeader(pPixmap, 0, 0, 0, 0, 0, NULL); > }
This is not a good fix; the same dance as for the !tex case in xorg_dri2.c:driDoCreateBuffer() would be necessary to ensure that there's a pixmap driver private and a texture. I consciously left that out because I couldn't seem to find any case where the driver private doesn't exist. If such cases do indeed exist, I'd rather get a clean crash than more subtle failure. In general, one must be careful not to just paper over theoretical issues pointed out by automated tools. -- Earthling Michel Dänzer | http://www.vmware.com Libre software enthusiast | Debian, X and DRI developer ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Mesa3d-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
