]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 31 Jul 2012 12:50:24 +0000 (12:50 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 31 Jul 2012 12:50:24 +0000 (12:50 +0000)
coders/gif.c

index ac69f5ecbbc534572d7305444e259f470504f292..e0d4f68f78cb60ab1ec1d8aa248edb2126fdd6f2 100644 (file)
@@ -1095,14 +1095,8 @@ static Image *ReadGIFImage(const ImageInfo *image_info,ExceptionInfo *exception)
               if (count == 0)
                 break;
               header[count]='\0';
-              comments=(char *) ResizeQuantumMemory(comments,length+count,
-                sizeof(*comments));
-              if (comments == (char *) NULL)
-                ThrowReaderException(ResourceLimitError,
-                  "MemoryAllocationFailed");
-              (void) CopyMagickMemory(comments+length,header,(size_t) count);
+              (void) ConcatenateString(&comments,(const char *) header);
             }
-            comments[length+count]='\0';
             (void) SetImageProperty(image,"comment",comments,exception);
             comments=DestroyString(comments);
             break;