[gs-commits] mupdf 1.16.1.61 Avoid signedness issues if quantities are
[email protected] (Sebastian Rasmussen) Tue, 1 Oct 2019 14:55:51 +0000 (UTC)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 0aa14b7a39f81cd6ac02aa4a67e2e1a47c0c92e1 Author: Sebastian Rasmussen <[email protected]> Date: Fri Sep 27 17:55:31 2019 +0200 Avoid signedness issues if quantities are known. diff --git a/source/fitz/load-tiff.c b/source/fitz/load-tiff.c index cdb4313..9376c22 100644 --- a/source/fitz/load-tiff.c +++ b/source/fitz/load-tiff.c @@ -343,7 +343,7 @@ tiff_decode_data(fz_context *ctx, struct tiff *tiff, const unsigned char *rp, un stm = fz_open_faxd(ctx, encstm, tiff->compression == 4 ? -1 : tiff->compression == 2 ? 0 : - tiff->g3opts & 1, + (int) (tiff->g3opts & 1), 0, tiff->compression == 2, tiff->imagewidth, @@ -1208,7 +1208,7 @@ tiff_decode_ifd(fz_context *ctx, struct tiff *tiff) fz_throw(ctx, FZ_ERROR_GENERIC, "too few components for transparency mask"); if (tiff->colorspace && tiff->colormap && tiff->samplesperpixel < 1) fz_throw(ctx, FZ_ERROR_GENERIC, "too few components for RGBPal"); - if (tiff->colorspace && !tiff->colormap && tiff->samplesperpixel < fz_colorspace_n(ctx, tiff->colorspace)) + if (tiff->colorspace && !tiff->colormap && tiff->samplesperpixel < (unsigned) fz_colorspace_n(ctx, tiff->colorspace)) fz_throw(ctx, FZ_ERROR_GENERIC, "fewer components per pixel than indicated by colorspace"); switch (tiff->resolutionunit) http://git.ghostscript.com/?p=mupdf.git;a=commit;h=0aa14b7a39f81cd6ac02aa4a67e2e1a47c0c92e1 -- MuPDF library Artifex Software, Inc.