# HG changeset patch # User malcolmp # Date 1083845533 0 # Node ID 00f374c786614e34b3a5dde5a9f59d96e3d5ec69 # Parent b75af0ab66f3fec88f8a0b4570e02cde5d0fce79 [xemacs-hg @ 2004-05-06 12:12:12 by malcolmp] GIF library crash fix. diff -r b75af0ab66f3 -r 00f374c78661 src/ChangeLog --- a/src/ChangeLog Wed May 05 22:09:18 2004 +0000 +++ b/src/ChangeLog Thu May 06 12:12:13 2004 +0000 @@ -1,3 +1,8 @@ +2004-05-05 Chuck Hines + + * dgif_lib.c (DGifSlurp): Changed do-while to while to stop + coredump from deref of NULL ptr (ExtData) + 2004-05-05 Jerry James * number.c: Use DEFINE_BASIC_LRECORD_IMPLEMENTATION instead of diff -r b75af0ab66f3 -r 00f374c78661 src/dgif_lib.c --- a/src/dgif_lib.c Wed May 05 22:09:18 2004 +0000 +++ b/src/dgif_lib.c Thu May 06 12:12:13 2004 +0000 @@ -740,11 +740,11 @@ case EXTENSION_RECORD_TYPE: DGifGetExtension(GifFile,&sp->Function,&ExtData); - do { + while (ExtData != NULL) { if (AddExtensionBlock(sp, ExtData[0], ExtData+1) == GIF_ERROR) GifInternError(GifFile, D_GIF_ERR_NOT_ENOUGH_MEM); DGifGetExtensionNext(GifFile, &ExtData); - } while (ExtData != NULL); + } break; case TERMINATE_RECORD_TYPE: