summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Hopf <mhopf@suse.de>2010-04-26 18:35:32 +0200
committerMatthias Hopf <mhopf@suse.de>2010-04-26 18:35:32 +0200
commit74dde3629f2fa2d5cf55149a30595a429e19a927 (patch)
treefeb7fa3a1244df45c8b923bc5058771cebb68393
parent4abbce4498f9a5eaff728f48710d8abe9ee9c012 (diff)
Fix crash in R300CheckComposite() due to broken pSrcPicture.
Date: Tue, 06 Apr 2010 10:37:18 +0200 From: Michel Dänzer <michel@daenzer.net> Subject: Re: xserver 1.8.0 radeonhd crashing Most likely pSrcPicture->pDrawable is NULL (i.e. it's a source-only, solid or gradient picture) in R300CheckComposite(), and that fails to check the pointer before dereferencing it.
-rw-r--r--src/radeon_exa_render.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index 252e7b0..71b5b16 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -1225,6 +1225,9 @@ static Bool FUNC_NAME(R300TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture,
PicturePtr pDstPicture)
{
+ if (!!pSrcPicture->pDrawable)
+ return FALSE;
+
VAR_PREAMBLE(pSrcPicture->pDrawable->pScreen);
uint32_t tmp1;
PixmapPtr pSrcPixmap, pDstPixmap;