GraphicsMagick: coders/tiff.c Check WriteCount even for scalar v...

GraphicsMagick Commits <[email protected]> Thu, 11 Jan 2024 20:12:32 -0600
Newsgroups gmane.comp.video.graphicsmagick.cvs
Message-ID <mailman.2277.1705025562.5550.graphicsmagick-commit@lists.sourceforge.net>
changeset ffe41af4b7c9 in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=ffe41af4b7c9
summary: coders/tiff.c Check WriteCount even for scalar values.

diffstat:

 coders/tiff.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r d0124d7b25cb -r ffe41af4b7c9 coders/tiff.c
--- a/coders/tiff.c	Fri Jan 12 02:41:35 2024 +0100
+++ b/coders/tiff.c	Fri Jan 12 03:12:11 2024 +0100
@@ -4541,9 +4541,11 @@
             case TIFF_BYTE:
             case TIFF_SHORT:
             case TIFF_LONG:
+                         if(WriteCount!=1)
+                             break;
                          if(FDT==TIFF_SHORT)
                          {
-                           if(TIFFSetField(tiff, Tag, (uint16_t)Value))
+                           if(TIFFSetField(tiff, Tag, (int)Value))
                              FieldCount++;
                            break;
                          }