AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

2004.12.21 10:58 "[Tiff] libtiff-3.7.1 -- bug + patch", by Peter Breitenlohner

On Mon, 18 Oct 2004, Frank Warmerdam wrote:

> Thanks for the patch, someone else reported the same issue.

>
> Why were you unwilling to submit it via bugzilla?..........

This time I tried bugzilla, but the promised
         "A token for changing your password has been emailed to you."

never arived here (at least not within one hour). [I had first tried to create an account and the promised password didn't arrive. Then I tried again, got the above, and waited....]

So once again an email that will need to be approved by the moderator. Sorry.

=============================================

I just fetched and built libtiff-3.7.1. There was a gcc warning

../../tiff-3.7.1/tools/tiffset.c: In function `main':

../../tiff-3.7.1/tools/tiffset.c:110: warning: assignment makes integer \

        from pointer without a cast

and sure enough there was a bug in the code. The attached patch should fix that.

regards
Peter Breitenlohner <peb@mppmu.mpg.de>

diff -ur tiff-3.7.1.orig/tools/tiffset.c tiff-3.7.1/tools/tiffset.c --- tiff-3.7.1.orig/tools/tiffset.c 2004-11-12 18:34:00.000000000 +0100 +++ tiff-3.7.1/tools/tiffset.c 2004-12-21 10:34:06.000000000 +0100 @@ -107,7 +107,7 @@

                 short   wc;

                 if (fip->field_writecount == TIFF_VARIABLE)

-                        wc = argv[arg_index++];
+                        wc = atoi(argv[arg_index++]);

                 else
                         wc = fip->field_writecount;