File: 0046-Fix-a-non-initialized-value-passed-to-TIFFGetField.patch

package info (click to toggle)
imagemagick 8%3A6.9.11.60%2Bdfsg-1.6%2Bdeb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 76,816 kB
  • sloc: ansic: 349,503; cpp: 21,804; xml: 11,029; perl: 6,417; sh: 5,877; makefile: 3,042; tcl: 459
file content (23 lines) | stat: -rw-r--r-- 955 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: Cristy <mikayla-grace@urban-warrior.org>
Date: Fri, 3 Sep 2021 19:45:32 -0400
Subject: Fix a non initialized value passed to TIFFGetField()

bug-oss-fuzz: https://oss-fuzz.com/testcase-detail/6502669439598592
bug: https://github.com/ImageMagick/ImageMagick6/issues/246
origin: https://github.com/ImageMagick/ImageMagick6/commit/995de330310dd35531165d9471fe4d31e0fa79ae
---
 coders/tiff.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/coders/tiff.c b/coders/tiff.c
index c326559..fd0169f 100644
--- a/coders/tiff.c
+++ b/coders/tiff.c
@@ -1485,6 +1485,7 @@ static Image *ReadTIFFImage(const ImageInfo *image_info,
       }
     if (TIFFGetFieldDefaulted(tiff,TIFFTAG_ORIENTATION,&orientation,sans) == 1)
       image->orientation=(OrientationType) orientation;
+    chromaticity=(float *) NULL;
     if (TIFFGetField(tiff,TIFFTAG_WHITEPOINT,&chromaticity) == 1)
       {
         if ((chromaticity != (float *) NULL) && (*chromaticity != 0.0))