Okay, I think I have found out why this happens.
In src/glyphs-eimage.c, it is assumed that the GifFileType *giffile
always has a SColorMap:
/* 3. Now create the EImage(s) */
{
ColorMapObject *cmo = unwind.giffile->SColorMap;
cmo is later dereferenced unconditionally:
*eip++ = cmo->Colors[pixel].Red;
In the definition of GifFileType in /usr/include/gif_lib.h - at least
on my machine - it says:
ColorMapObject *SColorMap; /* NULL if not exists. */
So it looks like the problematic gif has no SColorMap, and glyps-emage.c
doesn't handle that case.
I wonder what the correct way to handle it is.
This is the simplest idea I could come up with:
diff -r 04811a268716 src/glyphs-eimage.c
--- a/src/glyphs-eimage.c Sun Aug 15 15:42:45 2010 +0100
+++ b/src/glyphs-eimage.c Fri Aug 20 00:02:12 2010 +0200
@@ -703,6 +703,9 @@
static int InterlacedOffset[] = { 0, 4, 2, 1 };
static int InterlacedJumps[] = { 8, 8, 4, 2 };
+ if (cmo == NULL)
+ signal_image_error ("GIF image has no color map", instantiator);
+
height = unwind.giffile->SHeight;
width = unwind.giffile->SWidth;
pixels_sq = (UINT_64_BIT) width * (UINT_64_BIT) height;
Best regards,
Adam
--
"My internal clock is on Tokyo time." Adam Sjøgren
asjo(a)koldfront.dk
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/mailman/listinfo/xemacs-beta