From d46354584f9bcc674a4a0cccadbdfb9a9a772d2c Mon Sep 17 00:00:00 2001
From: Su_Laus <[EMAIL REDACTED]>
Date: Fri, 16 Dec 2022 18:47:55 +0100
Subject: [PATCH] Behavior of TIFFOpen() mode "r+" in the Windows
implementation adjusted to that of Linux.
---
libtiff/tif_win32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libtiff/tif_win32.c b/libtiff/tif_win32.c
index 8b476506..61ff724a 100644
--- a/libtiff/tif_win32.c
+++ b/libtiff/tif_win32.c
@@ -274,7 +274,7 @@ TIFF *TIFFOpenExt(const char *name, const char *mode, TIFFOpenOptions *opts)
dwMode = OPEN_EXISTING;
break;
case O_RDWR:
- dwMode = OPEN_ALWAYS;
+ dwMode = OPEN_EXISTING;
break;
case O_RDWR | O_CREAT:
dwMode = OPEN_ALWAYS;