summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2005-04-11 09:33:43 +0000
committerEgbert Eich <eich@suse.de>2005-04-11 09:33:43 +0000
commitadac7011965ed75ea399b93dae917cb48180c77a (patch)
treebb5d15e1bcc843e2da8e65407fe46525c71eb12a /mi
parent5e2080ef93a598c6d68e1b2f446f251ab025b702 (diff)
Preventing hight for drawing from becoming negative when face->dy < 0. The
height value is used in miFillPolyHelper() to calculate the size of memory to be allocated. A negative value will lead to a crash (Bugzilla #2690, Keith Packard, Egbert Eich).
Diffstat (limited to 'mi')
-rw-r--r--mi/miwideline.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mi/miwideline.c b/mi/miwideline.c
index 8888ca8bd..20bef031b 100644
--- a/mi/miwideline.c
+++ b/mi/miwideline.c
@@ -1168,6 +1168,10 @@ miLineProjectingCap (pDrawable, pGC, pixel, spanData, face, isLeft, xorg, yorg,
}
else if (dx == 0)
{
+ if (dy < 0) {
+ dy = -dy;
+ isLeft = !isLeft;
+ }
topy = yorgi;
bottomy = yorgi + dy;
if (isLeft)