emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address@hidden: segfault on buggy .gif + patch to fix it]


From: Richard Stallman
Subject: address@hidden: segfault on buggy .gif + patch to fix it]
Date: Fri, 07 Sep 2007 02:31:28 -0400

Would someone please check this patch, and either install
it and ack or expain why it is wrong?


------- Start of forwarded message -------
X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY 
        autolearn=failed version=3.1.0
To: address@hidden
From: Pixel <address@hidden>
Date: Thu, 06 Sep 2007 16:00:09 +0200
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Subject: segfault on buggy .gif + patch to fix it

- --=-=-=

download http://people.mandriva.com/~prigaux/content.gif
(file not attached here for gnus users out there...)

then do "emacs content.gif" in X mode, it will segfault.

here is a simple patch to fix the issue:


- --=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=emacs-snapshot-fix-segfault-loading-wrong-gif.patch

Index: src/image.c
===================================================================
RCS file: /sources/emacs/emacs/src/image.c,v
retrieving revision 1.85
diff -u -r1.85 image.c
- --- src/image.c       30 Aug 2007 05:05:58 -0000      1.85
+++ src/image.c 6 Sep 2007 13:56:19 -0000
@@ -7886,7 +7886,8 @@
   init_color_table ();
   bzero (pixel_colors, sizeof pixel_colors);
 
- -  for (i = 0; i < gif_color_map->ColorCount; ++i)
+  if (gif_color_map)
+    for (i = 0; i < gif_color_map->ColorCount; ++i)
     {
       int r = gif_color_map->Colors[i].Red << 8;
       int g = gif_color_map->Colors[i].Green << 8;

- --=-=-=


reproduced on:
  GNU Emacs 22.1.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 
2007-08-22 on raven, modified by Debian
  GNU Emacs 22.1.1 (i386-mandrake-linux-gnu, X toolkit, Xaw3d scroll bars) of 
2007-09-06 on n4.mandriva.com, modified by Mandriva
  GNU Emacs 23.0.50.3 (i686-pc-linux-gnu, GTK+ Version 2.11.6, multi-tty) of 
2007-09-06 on n4.mandriva.com

the buggy gif comes from a MMS by SFR (a french mobile phone operator)

- --=-=-=
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
bug-gnu-emacs mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs

- --=-=-=--
------- End of forwarded message -------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]