Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > 4ce62471e13add3f87ef784c6ad2375e > files > 4

libtiff-4.0.10-1.git20190219.1.mga6.src.rpm

Index: tiff-4.0.10/libtiff/tif_dirwrite.c
===================================================================
--- tiff-4.0.10.orig/libtiff/tif_dirwrite.c	2018-06-24 22:26:30.335763566 +0200
+++ tiff-4.0.10/libtiff/tif_dirwrite.c	2018-11-19 14:21:42.703256410 +0100
@@ -1883,6 +1883,9 @@ TIFFWriteDirectoryTagTransferfunction(TI
 	}
 	m=(1<<tif->tif_dir.td_bitspersample);
 	n=tif->tif_dir.td_samplesperpixel-tif->tif_dir.td_extrasamples;
+        if (tif->tif_dir.td_transferfunction[2] == NULL ||
+            tif->tif_dir.td_transferfunction[1] == NULL)
+          n = 1;
 	/*
 	 * Check if the table can be written as a single column,
 	 * or if it must be written as 3 columns.  Note that we