summaryrefslogtreecommitdiff
path: root/exa
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>2013-10-02 15:47:54 +0200
committerHans de Goede <hdegoede@redhat.com>2016-06-17 11:21:30 +0200
commitc6511d0142040654140bdedd6f03d43af0abba21 (patch)
tree3f7fc866bad3e2caec35137ed50fbd7fba73f165 /exa
parent2d6230e77348e550c90e00c007b113ce38c81d12 (diff)
exa: only draw valid trapezoids
Fixes freedesktop.org bug https://bugs.freedesktop.org/show_bug.cgi?id=67484 If t->bottom is close to MIN_INT, removing top can wraparound, so do the check properly. A similar fix should also be applied to pixman. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'exa')
-rw-r--r--exa/exa_render.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/exa/exa_render.c b/exa/exa_render.c
index fc3ddea79..b24bec052 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -1141,7 +1141,8 @@ exaTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST);
for (; ntrap; ntrap--, traps++)
- (*ps->RasterizeTrapezoid) (pPicture, traps, -bounds.x1, -bounds.y1);
+ if (xTrapezoidValid(traps))
+ (*ps->RasterizeTrapezoid) (pPicture, traps, -bounds.x1, -bounds.y1);
exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST);
xRel = bounds.x1 + xSrc - xDst;