Make stride signed in various places. This should fix some the
authorSøren Sandmann <sandmann@redhat.com>
Wed, 17 Oct 2007 23:20:55 +0000 (19:20 -0400)
committerSøren Sandmann <sandmann@redhat.com>
Wed, 17 Oct 2007 23:20:55 +0000 (19:20 -0400)
crashers that people have reported in bug 12398.

pixman/pixman-compose.c

index 1e91864..4c73822 100644 (file)
@@ -2880,7 +2880,7 @@ static void fbFetchSolid(bits_image_t * pict, int x, int y, int width, uint32_t
 static void fbFetch(bits_image_t * pict, int x, int y, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits)
 {
     uint32_t *bits;
-    uint32_t stride;
+    int32_t stride;
     fetchProc fetch = fetchProcForPicture(pict);
     const pixman_indexed_t * indexed = pict->indexed;
     
@@ -3560,7 +3560,7 @@ static void pixmanFetchSourcePict(source_image_t * pict, int x, int y, int width
 static void fbFetchTransformed(bits_image_t * pict, int x, int y, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits)
 {
     uint32_t     *bits;
-    uint32_t    stride;
+    int32_t    stride;
     fetchPixelProc   fetch;
     pixman_vector_t    v;
     pixman_vector_t  unit;
@@ -4093,7 +4093,7 @@ static void fbFetchExternalAlpha(bits_image_t * pict, int x, int y, int width, u
 static void fbStore(bits_image_t * pict, int x, int y, int width, uint32_t *buffer)
 {
     uint32_t *bits;
-    uint32_t stride;
+    int32_t stride;
     storeProc store = storeProcForPicture(pict);
     const pixman_indexed_t * indexed = pict->indexed;
     
@@ -4107,7 +4107,7 @@ static void fbStore(bits_image_t * pict, int x, int y, int width, uint32_t *buff
 static void fbStoreExternalAlpha(bits_image_t * pict, int x, int y, int width, uint32_t *buffer)
 {
     uint32_t *bits, *alpha_bits;
-    uint32_t stride, astride;
+    int32_t stride, astride;
     int ax, ay;
     storeProc store;
     storeProc astore;
@@ -4163,7 +4163,7 @@ PIXMAN_COMPOSITE_RECT_GENERAL (const FbComposeData *data,
     unsigned int srcClass = SOURCE_IMAGE_CLASS_UNKNOWN;
     unsigned int maskClass = SOURCE_IMAGE_CLASS_UNKNOWN;
     uint32_t *bits;
-    uint32_t stride;
+    int32_t stride;
     int xoff, yoff;
     
     if (data->op == PIXMAN_OP_CLEAR)