]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Mon, 2 Feb 2015 01:12:54 +0000 (01:12 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Mon, 2 Feb 2015 01:12:54 +0000 (01:12 +0000)
coders/gif.c

index 70e3a23fcbcc55af79dd81fd5a204381581ab392..c92c3d383f492be861f77ad229b7f4074c1e1864 100644 (file)
@@ -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.