pixman: Branch 'master'
Søren Sandmann Pedersen
sandmann at kemper.freedesktop.org
Wed Jan 19 04:26:36 PST 2011
pixman/pixman-bits-image.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit 1d7195dd6c68eab73d063f37de3a9331446111d4
Author: Søren Sandmann Pedersen <ssp at redhat.com>
Date: Mon Jan 17 14:12:20 2011 -0500
Fix dangling-pointer bug in bits_image_fetch_bilinear_no_repeat_8888().
The mask_bits variable is only declared in a limited scope, so the
pointer to it becomes invalid instantly. Somehow this didn't actually
trigger any bugs, but Brent Fulgham reported that Bounds Checker was
complaining about it.
Fix the bug by moving mask_bits to the function scope.
diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c
index 98a2b6d..a865d71 100644
--- a/pixman/pixman-bits-image.c
+++ b/pixman/pixman-bits-image.c
@@ -295,6 +295,7 @@ bits_image_fetch_bilinear_no_repeat_8888 (pixman_image_t * ima,
uint32_t *bottom_row;
uint32_t *end;
uint32_t zero[2] = { 0, 0 };
+ uint32_t one = 1;
int y, y1, y2;
int disty;
int mask_inc;
@@ -360,10 +361,8 @@ bits_image_fetch_bilinear_no_repeat_8888 (pixman_image_t * ima,
*/
if (!mask)
{
- uint32_t mask_bits = 1;
-
mask_inc = 0;
- mask = &mask_bits;
+ mask = &one;
}
else
{
More information about the xorg-commit
mailing list