summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRitesh Khadgaray <khadgaray@gmail.com>2013-10-23 17:29:07 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2013-11-01 20:24:57 -0400
commit5e14da97f16e421d084a9e735be21b1025150f0c (patch)
treee7b636ccc5ae2f5fd5d3ab8cc83469cd44394b75
parent2f876cf86718d3dd9b3b04ae9552530edafe58a1 (diff)
pixman_trapezoid_valid(): Fix underflow when bottom is close to MIN_INT
If t->bottom is close to MIN_INT (probably invalid value), subtracting top can lead to underflow which causes crashes. Attached patch will fix the issue. This fixes bug 67484.
-rw-r--r--pixman/pixman.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/pixman/pixman.h b/pixman/pixman.h
index 7ff9fb5..509ba5e 100644
--- a/pixman/pixman.h
+++ b/pixman/pixman.h
@@ -1030,7 +1030,7 @@ struct pixman_triangle
#define pixman_trapezoid_valid(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 > (t)->top))
struct pixman_span_fix
{