[PATCH] Possible overrun in bilinear_interpolate_line_sse

Makoto Kato m_kato at ga2.so-net.ne.jp
Fri May 27 03:18:47 PDT 2011


---
 pixman/pixman-sse2.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c
index 533b858..44b3ebe 100644
--- a/pixman/pixman-sse2.c
+++ b/pixman/pixman-sse2.c
@@ -5618,7 +5618,7 @@ bilinear_interpolate_line_sse2 (uint32_t *       out,
 	pix = _mm_cvtsi128_si32 (a);						\
     } while (0)
 
-    while ((width -= 4) >= 0)
+    while (width >= 4)
     {
 	INTERPOLATE_ONE_PIXEL (pix1);
 	INTERPOLATE_ONE_PIXEL (pix2);
@@ -5628,6 +5628,7 @@ bilinear_interpolate_line_sse2 (uint32_t *       out,
 	*out++ = pix2;
 	*out++ = pix3;
 	*out++ = pix4;
+        width -= 4;
     }
     if (width & 2)
     {
-- 
1.7.4.1


--------------070207010100080203050102--


More information about the Pixman mailing list