tiffdec: only request EXTRASAMPLES w/> 3 samples/px

Change-Id: I820e7de34e500c42ab51c97a70f25319807d58eb
This commit is contained in:
James Zern 2017-04-25 19:09:02 -07:00
parent f768218966
commit 97cce5ba83

View File

@ -193,7 +193,7 @@ int ReadTIFF(const uint8_t* const data, size_t data_size,
sizeof(*raster))) { sizeof(*raster))) {
goto End; goto End;
} }
if (!TIFFGetField(tif, TIFFTAG_EXTRASAMPLES, if (samples_per_px > 3 && !TIFFGetField(tif, TIFFTAG_EXTRASAMPLES,
&extra_samples, &extra_samples_ptr)) { &extra_samples, &extra_samples_ptr)) {
fprintf(stderr, "Error! Cannot retrieve TIFF ExtraSamples info.\n"); fprintf(stderr, "Error! Cannot retrieve TIFF ExtraSamples info.\n");
goto End; goto End;