* image.c (png_load): Don't assume height * row_bytes fits in 'int'.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Jul 2011 03:42:26 +0000 (20:42 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Jul 2011 03:42:26 +0000 (20:42 -0700)
src/ChangeLog
src/image.c

index 3862ce4..9513dfd 100644 (file)
@@ -1,3 +1,7 @@
+2011-07-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
+
 2011-07-12  Paul Eggert  <eggert@cs.ucla.edu>
 
        * bidi.c (bidi_dump_cached_states): Use pD to print ptrdiff_t.
index f6626f6..1b6e67b 100644 (file)
@@ -5558,7 +5558,8 @@ png_load (struct frame *f, struct image *img)
 {
   Lisp_Object file, specified_file;
   Lisp_Object specified_data;
-  int x, y, i;
+  int x, y;
+  ptrdiff_t i;
   XImagePtr ximg, mask_img = NULL;
   png_struct *png_ptr = NULL;
   png_info *info_ptr = NULL, *end_info = NULL;