Bug 6867 - Segfault in ProcRenderComposite
Summary: Segfault in ProcRenderComposite
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: All All
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks: 5041
  Show dependency treegraph
 
Reported: 2006-05-09 17:22 UTC by Michel Dänzer
Modified: 2006-05-09 15:36 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Fix potentiall NULL pointer dereference (920 bytes, patch)
2006-05-09 17:24 UTC, Michel Dänzer
no flags Details | Splinter Review
Simpler fix (798 bytes, patch)
2006-05-09 17:46 UTC, Michel Dänzer
no flags Details | Splinter Review

Description Michel Dänzer 2006-05-09 17:22:06 UTC
Even though ProcRenderComposite checks for pSrc->pDrawable being non-NULL, it
can still dereference it unconditionally later on. I'm going to attach a patch
that fixes this.
Comment 1 Michel Dänzer 2006-05-09 17:24:55 UTC
Created attachment 5572 [details] [review]
Fix potentiall NULL pointer dereference

Move parens such that all dereferences of pSrc->pDrawable are guarded by the
test for it not being NULL.
Comment 2 Michel Dänzer 2006-05-09 17:46:22 UTC
Created attachment 5573 [details] [review]
Simpler fix

Actually, I think the idea was to compare the pScreens of pMask and pDst
instead of pMask and pSrc.
Comment 3 Adam Jackson 2006-05-10 08:36:24 UTC
looks correct to me.  applied to 1.1 branch and head, thanks!


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.