Bug 6867

Summary: Segfault in ProcRenderComposite
Product: xorg Reporter: Michel Dänzer <michel>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high Keywords: patch
Version: git   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 5041    
Attachments:
Description Flags
Fix potentiall NULL pointer dereference
none
Simpler fix none

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.