From: Pixel <pixel@mandriva.com>
To: bug-gnu-emacs@gnu.org
Subject: segfault on buggy .gif + patch to fix it
Date: Thu, 06 Sep 2007 16:00:09 +0200 [thread overview]
Message-ID: <lylkbjlwra.fsf@leia.mandriva.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 211 bytes --]
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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: emacs-snapshot-fix-segfault-loading-wrong-gif.patch --]
[-- Type: text/x-patch, Size: 599 bytes --]
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;
[-- Attachment #3: Type: text/plain, Size: 437 bytes --]
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)
[-- Attachment #4: Type: text/plain, Size: 149 bytes --]
_______________________________________________
bug-gnu-emacs mailing list
bug-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs
next reply other threads:[~2007-09-06 14:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-06 14:00 Pixel [this message]
2007-09-06 20:30 ` segfault on buggy .gif + patch to fix it Thien-Thi Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=lylkbjlwra.fsf@leia.mandriva.com \
--to=pixel@mandriva.com \
--cc=bug-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.