EGifOpen doesn't initialize the compression hash table
A library and utilities for processing GIFs
Brought to you by:
abadger1999,
esr
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;
patch attached to avoid any mangling
Logged In: YES
user_id=538565
never mind, someone else had already supplied a similar
patch (any chance of a release so I can point people at a
version that works?)