patch attached to avoid any mangling
Unlike the other EGifOpen...() functions, EGifOpen()
doesn't initialize the compression hash table. This
patch fixes that.
This only applies to giflib, not to libungif.
diff -ru giflib-4.1.3/lib/egif_lib.c
giflib-4.1.3-works/lib/egif_lib.c
--- giflib-4.1.3/lib/egif_lib.c Sun May 30 08:48:48 2004
+++ giflib-4.1.3-works/lib/egif_lib.c Wed Dec 8
00:02:00 2004
@@ -188,6 +188,12 @@
_GifError = E_GIF_ERR_NOT_ENOUGH_MEM;
return NULL;
}
+ if ((Private->HashTable = _InitHashTable()) == NULL) {
+ free(GifFile);
+ free(Private);
+ _GifError = E_GIF_ERR_NOT_ENOUGH_MEM;
+ return NULL;
+ }
GifFile->Private = (VoidPtr) Private; Private->FileHandle = 0;