X-Git-Url: https://git.piment-noir.org/?p=deb_xorg-server.git;a=blobdiff_plain;f=debian%2Fpatches%2Fpixman-validate.patch;fp=debian%2Fpatches%2Fpixman-validate.patch;h=513de6ce5c003d00a010f7e738df3ebfa744aa99;hp=0000000000000000000000000000000000000000;hb=7217e0ca50bba73dad94782e67980aeeb24ab693;hpb=a09e091a5c996d46a398abb27b06fe504591673f diff --git a/debian/patches/pixman-validate.patch b/debian/patches/pixman-validate.patch new file mode 100644 index 0000000..513de6c --- /dev/null +++ b/debian/patches/pixman-validate.patch @@ -0,0 +1,27 @@ +diff --git a/exa/exa_render.c b/exa/exa_render.c +index 172e2b5..807eeba 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; +diff --git a/render/picture.h b/render/picture.h +index c85353a..49eb263 100644 +--- a/render/picture.h ++++ b/render/picture.h +@@ -211,7 +211,7 @@ typedef pixman_fixed_t xFixed; + /* whether 't' is a well defined not obviously empty trapezoid */ + #define xTrapezoidValid(t) ((t)->left.p1.y != (t)->left.p2.y && \ + (t)->right.p1.y != (t)->right.p2.y && \ +- (int) ((t)->bottom - (t)->top) > 0) ++ (t)->bottom > 0 && (int) ((t)->bottom - (t)->top) > 0) + + /* + * Standard NTSC luminance conversions: