tiff: Limit bits per sample to 16 until MuPDF supports more.
authorSebastian Rasmussen <[email protected]>
Tue, 4 Apr 2023 16:39:33 +0000 (18:39 +0200)
committerSebastian Rasmussen <[email protected]>
Wed, 5 Apr 2023 15:10:03 +0000 (17:10 +0200)
This fixes Coverity CID 313480.

source/fitz/load-tiff.c

index 544682786f60d6e883e41dd46cf1ee6e796d085c..e0acef7cb13e9b2af92822d19ae205f154a6f148 100644 (file)
@@ -1236,10 +1236,10 @@ tiff_read_ifd(fz_context *ctx, struct tiff *tiff)
                offset += 12;
        }
 
-       if (tiff->bitspersample > 32)
+       if (tiff->bitspersample > 16)
        {
-               fz_warn(ctx, "limiting bits per component to 32 in TIFF image");
-               tiff->bitspersample = 32;
+               fz_warn(ctx, "limiting bits per component to 16 in TIFF image");
+               tiff->bitspersample = 16;
        }
 
        tiff->maxcolors = tiff->colormaplen;