From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pixel Newsgroups: gmane.emacs.bugs Subject: segfault on buggy .gif + patch to fix it Date: Thu, 06 Sep 2007 16:00:09 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1189096298 2374 80.91.229.12 (6 Sep 2007 16:31:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 6 Sep 2007 16:31:38 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 06 18:31:37 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ITKGO-0003XJ-Au for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Sep 2007 18:31:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ITKGM-0001eT-HZ for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Sep 2007 12:31:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ITHsn-0005dy-If for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2007 09:58:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ITHsl-0005dK-Eb for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2007 09:58:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ITHsl-0005dH-71 for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2007 09:58:55 -0400 Original-Received: from office-abk.mandriva.com ([84.55.162.90] helo=office.mandriva.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ITHsk-0000ZP-PH for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2007 09:58:54 -0400 Original-Received: from leia.mandriva.com (leia.mandriva.com [192.168.100.39]) by office.mandriva.com (Postfix) with ESMTP id 851FA7F63 for ; Thu, 6 Sep 2007 16:09:39 +0200 (CEST) Original-Received: by leia.mandriva.com (Postfix, from userid 505) id 1BF8523F4A; Thu, 6 Sep 2007 16:00:09 +0200 (CEST) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Thu, 06 Sep 2007 12:31:14 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16492 Archived-At: --=-=-= 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 bug-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs --=-=-=--