From: Søren Sandmann Pedersen <s...@redhat.com>

A check is needed that the creation of the temporary image in
pixman_composite_trapezoids() succeeds.

Fixes crash in stress-test -s 0x313c on my system.
---
 pixman/pixman-trap.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pixman/pixman-trap.c b/pixman/pixman-trap.c
index 4dad179..91766fd 100644
--- a/pixman/pixman-trap.c
+++ b/pixman/pixman-trap.c
@@ -523,8 +523,9 @@ pixman_composite_trapezoids (pixman_op_t            op,
        if (!get_trap_extents (op, dst, traps, n_traps, &box))
            return;
        
-       tmp = pixman_image_create_bits (
-           mask_format, box.x2 - box.x1, box.y2 - box.y1, NULL, -1);
+       if (!(tmp = pixman_image_create_bits (
+                 mask_format, box.x2 - box.x1, box.y2 - box.y1, NULL, -1)))
+           return;
        
        for (i = 0; i < n_traps; ++i)
        {
-- 
1.7.11.7

_______________________________________________
Pixman mailing list
Pixman@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to