Commit f18cba455 for imagemagick.org
commit f18cba455a6b12300bdd4dce8bcd37e183da6aa7
Author: Dirk Lemstra <dirk@lemstra.org>
Date: Fri Nov 6 00:51:15 2026 +0100
Correct tga_info initialization (#9099)
diff --git a/coders/tga.c b/coders/tga.c
index 6ab8638eb..dfcec7821 100644
--- a/coders/tga.c
+++ b/coders/tga.c
@@ -205,8 +205,8 @@ static Image *ReadTGAImage(const ImageInfo *image_info,ExceptionInfo *exception)
/*
Read TGA header information.
*/
- count=ReadBlob(image,1,&tga_info.id_length);
(void) memset(&tga_info,0,sizeof(tga_info));
+ count=ReadBlob(image,1,&tga_info.id_length);
tga_info.colormap_type=(unsigned char) ReadBlobByte(image);
tga_info.image_type=(TGAImageType) ReadBlobByte(image);
if ((count != 1) ||