Bug 29181

Summary: dereference before null check src/glx/dri2_glx.c:617
Product: Mesa Reporter: Vinson Lee <vlee>
Component: GLXAssignee: Kristian Høgsberg <krh>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Vinson Lee 2010-07-20 14:01:18 UTC
mesa: 62f8b56dc6bcc13a30ed4f8c2d71e5a139b57b33 (master)

617: "pdraw" directly dereferenced
621: "pdraw" null check

Either 617 could be a null dereference or the 621 null check in unnecessary.

src/glx/dri2_glx.c
   612  _X_HIDDEN void
   613  dri2InvalidateBuffers(Display *dpy, XID drawable)
   614  {
   615     __GLXDRIdrawable *pdraw =
   616        dri2GetGlxDrawableFromXDrawableId(dpy, drawable);
-> 617     struct dri2_screen *psc = (struct dri2_screen *) pdraw->psc;
   618     struct dri2_drawable *pdp = (struct dri2_drawable *) pdraw;
   619  
   620  #if __DRI2_FLUSH_VERSION >= 3
-> 621     if (pdraw && psc->f)
   622         psc->f->invalidate(pdp->driDrawable);
   623  #endif
   624  }
Comment 1 GitLab Migration User 2019-09-18 17:12:05 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/64.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.