From 8a58319106fed41d70c6cb5d759fbbdecabf8919 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 31 May 2020 21:18:21 +0200 Subject: [PATCH] TWebPSetupEncode(): fix logic problem (and instead of or) in test that checks input is 8bit unsigned data --- libtiff/tif_webp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtiff/tif_webp.c b/libtiff/tif_webp.c index 22665f2d..c7885539 100644 --- a/libtiff/tif_webp.c +++ b/libtiff/tif_webp.c @@ -333,7 +333,7 @@ TWebPSetupEncode(TIFF* tif) } /* check bits per sample and data type */ - if ((nBitsPerSample != 8) && (sampleFormat != 1)) { + if ((nBitsPerSample != 8) || (sampleFormat != SAMPLEFORMAT_UINT)) { TIFFErrorExt(tif->tif_clientdata, module, "WEBP driver requires 8 bit unsigned data"); return 0;