From 6d331d781104f37e8ad6a563aad0d3c773749880 Mon Sep 17 00:00:00 2001
From: headshog <[EMAIL REDACTED]>
Date: Mon, 17 Jul 2023 09:50:42 +0000
Subject: [PATCH] TIFFReadDirectoryCheckOrder: avoid integer overflow
When it occurs, it should be harmless in practice though
---
libtiff/tif_dirread.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c
index bc6bbdc5..7df972ea 100644
--- a/libtiff/tif_dirread.c
+++ b/libtiff/tif_dirread.c
@@ -4376,7 +4376,7 @@ static void
TIFFReadDirectoryCheckOrder(TIFF* tif, TIFFDirEntry* dir, uint16 dircount)
{
static const char module[] = "TIFFReadDirectoryCheckOrder";
- uint16 m;
+ uint32 m;
uint16 n;
TIFFDirEntry* o;
m=0;