From: cristy Date: Mon, 2 Feb 2015 01:12:54 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~1326 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9e20c8f43975c154ec42296e1b672406970efa89;p=imagemagick --- diff --git a/coders/gif.c b/coders/gif.c index 70e3a23fc..c92c3d383 100644 --- a/coders/gif.c +++ b/coders/gif.c @@ -573,9 +573,6 @@ static MagickBooleanType EncodeImage(const ImageInfo *image_info,Image *image, Quantum index; - register ssize_t - i; - short *hash_code, *hash_prefix, @@ -631,6 +628,9 @@ static MagickBooleanType EncodeImage(const ImageInfo *image_info,Image *image, /* Initialize GIF encoder. */ + (void) ResetMagickMemory(hash_code,0,MaxHashTable*sizeof(*hash_code)); + (void) ResetMagickMemory(hash_prefix,0,MaxHashTable*sizeof(*hash_prefix)); + (void) ResetMagickMemory(hash_suffix,0,MaxHashTable*sizeof(*hash_suffix)); number_bits=data_size; max_code=MaxCode(number_bits); clear_code=((short) one << (data_size-1)); @@ -639,8 +639,6 @@ static MagickBooleanType EncodeImage(const ImageInfo *image_info,Image *image, length=0; datum=0; bits=0; - for (i=0; i < MaxHashTable; i++) - hash_code[i]=0; GIFOutputCode(clear_code); /* Encode pixels.