diff -ru giflib-4.1.6/util/giffix.c giflib-4.1.6.new/util/giffix.c
--- giflib-4.1.6/util/giffix.c	2005-10-09 23:22:23.000000000 -0700
+++ giflib-4.1.6.new/util/giffix.c	2008-09-04 14:00:41.000000000 -0700
@@ -181,8 +181,8 @@
 		/* Skip any extension blocks in file: */
 		if (DGifGetExtension(GifFileIn, &ExtCode, &Extension) == GIF_ERROR)
 		    QuitGifError(GifFileIn, GifFileOut);
-		if (EGifPutExtension(GifFileOut, ExtCode, Extension[0],
-							Extension) == GIF_ERROR)
+		if (Extension && EGifPutExtension(GifFileOut, ExtCode,
+					Extension[0], Extension) == GIF_ERROR)
 		    QuitGifError(GifFileIn, GifFileOut);
 
 		/* No support to more than one extension blocks, so discard: */

