Bug 29181 - dereference before null check src/glx/dri2_glx.c:617
Summary: dereference before null check src/glx/dri2_glx.c:617
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: GLX (show other bugs)
Version: git
Hardware: All All
: medium normal
Assignee: Kristian Høgsberg
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-20 14:01 UTC by Vinson Lee
Modified: 2019-09-18 17:12 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.