summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2012-12-13 20:37:40 (GMT)
committerSøren Sandmann Pedersen <ssp@redhat.com>2012-12-13 21:13:11 (GMT)
commit6a6c8c51ed9e7272e624b3c99187ddf71d19a0fd (patch)
treec0d836cfe956616d616ca4bc037ab0cc70f78094
parentc2cb303d33ec11390b93cabd90f0f95bc9264113 (diff)
downloadpixman-6a6c8c51ed9e7272e624b3c99187ddf71d19a0fd.tar.gz
pixman-6a6c8c51ed9e7272e624b3c99187ddf71d19a0fd.tar.xz
pixman_composite_trapezoids(): Check for NULL return from create_bits()
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.
-rw-r--r--pixman/pixman-trap.c5
1 files 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)
{