1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
From: Cristy <urban-warrior@imagemagick.org>
Date: Fri, 11 Feb 2022 10:46:49 -0500
Subject: Fix unintialised value
bug: https://github.com/ImageMagick/ImageMagick/issues/4830
origin: https://github.com/ImageMagick/ImageMagick6/commit/409d42205927c98cbb852ca96e109716f38f04ab
---
coders/tiff.c | 35 ++++++++++++++++-------------------
1 file changed, 16 insertions(+), 19 deletions(-)
diff --git a/coders/tiff.c b/coders/tiff.c
index 516d4a1..aad3063 100644
--- a/coders/tiff.c
+++ b/coders/tiff.c
@@ -567,10 +567,7 @@ static MagickBooleanType ReadProfile(Image *image,const char *name,
image->filename);
status=SetImageProfile(image,name,profile);
profile=DestroyStringInfo(profile);
- if (status == MagickFalse)
- ThrowBinaryImageException(ResourceLimitError,"MemoryAllocationFailed",
- image->filename);
- return(MagickTrue);
+ return(status);
}
#if defined(__cplusplus) || defined(c_plusplus)
@@ -1217,21 +1214,21 @@ static Image *ReadTIFFImage(const ImageInfo *image_info,
method;
uint16
- compress_tag,
- bits_per_sample,
- endian,
- extra_samples,
- interlace,
- max_sample_value,
- min_sample_value,
- orientation,
- pages,
- photometric,
- *sample_info,
- sample_format,
- samples_per_pixel,
- units,
- value;
+ compress_tag = 0,
+ bits_per_sample = 0,
+ endian = 0,
+ extra_samples = 0,
+ interlace = 0,
+ max_sample_value = 0,
+ min_sample_value = 0,
+ orientation = 0,
+ pages = 0,
+ photometric = 0,
+ *sample_info = NULL,
+ sample_format = 0,
+ samples_per_pixel = 0,
+ units = 0,
+ value = 0;
uint32
height,
|