Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-n.b-one.net (mx-n.one.com [91.198.169.61])
	by mail9.b-one.net (Postfix) with ESMTP id E1ADB405115
	for <info@awaresystems.be>; Sun, 30 Aug 2009 19:07:09 +0200 (CEST)
X-Virus-Scanned: by one.com
X-Spam-Score: 0
X-Spam-Level: 
X-Spam-Status: No, score=0 tagged_above=0 required=6 tests=[none]
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144])
	by mx-n.b-one.net (Postfix) with ESMTP id 0181D8C68A9
	for <info@awaresystems.be>; Sun, 30 Aug 2009 19:07:08 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id F26D61D20208A;
	Sun, 30 Aug 2009 12:06:35 -0500 (EST)
Received: from fw.envitory.se (unknown [194.237.231.18])
	by lists.maptools.org (Postfix) with ESMTP id 57A881D18DE8F
	for <tiff@lists.maptools.org>; Sun, 30 Aug 2009 11:41:05 -0500 (EST)
Received: from fw.envitory.se (localhost [127.0.0.1])
	by fw.envitory.se (Postfix) with SMTP id BC59110101F
	for <tiff@lists.maptools.org>; Sun, 30 Aug 2009 18:41:05 +0200 (CEST)
Received: from lnx001.envitory.se (unknown [192.168.1.7])
	by fw.envitory.se (Postfix) with SMTP id B9FA8100F97
	for <tiff@lists.maptools.org>; Sun, 30 Aug 2009 18:41:05 +0200 (CEST)
Received: (qmail 30777 invoked from network); 30 Aug 2009 18:19:44 +0200
X-Remote-IP: 194.237.231.27
Received: from k27.jokknet.se (HELO oe.nux.tld) (194.237.231.27)
	by mail.envitory.se with SMTP; 30 Aug 2009 18:19:44 +0200
From: Oden Eriksson <oeriksson@mandriva.com>
Organization: Mandriva
To: tiff@lists.maptools.org
Date: Sun, 30 Aug 2009 18:41:03 +0200
User-Agent: KMail/1.11.4 (Linux/2.6.29.6-desktop-2mnb; KDE/4.2.4; x86_64; ; )
References: <200908301350.40432.oeriksson@mandriva.com>
	<Pine.SOC.4.64.0908301121440.1103@freddy.simplesystems.org>
In-Reply-To: <Pine.SOC.4.64.0908301121440.1103@freddy.simplesystems.org>
MIME-Version: 1.0
Content-Type: Multipart/Mixed;
  boundary="Boundary-00=_fuqmKE2iRE90Q4L"
Message-Id: <200908301841.03898.oeriksson@mandriva.com>
Subject: Re: [Tiff] string format errors
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

--Boundary-00=_fuqmKE2iRE90Q4L
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

s=F6ndagen den 30 augusti 2009 18.25.23 skrev  Bob Friesenhahn:
> On Sun, 30 Aug 2009, Oden Eriksson wrote:
> > Attached is a patch to fix build with gcc when using the "-Wformat -
> > Werror=3Dformat-security" flags. It applies to 3.9.1
>
> Those warnings were bothering me as well.  I have applied your fixes
> to the branch-3-9 CVS branch.  Are you able to provide a similar patch
> for tiff-4.0.0beta4?

Most issues seems fixed in 4.0.0beta4, a patch is applied.

=2D-=20
Regards // Oden Eriksson

--Boundary-00=_fuqmKE2iRE90Q4L
Content-Type: text/x-patch;
  charset="ISO-8859-15";
  name="tiff-4.0.0beta4-format_not_a_string_literal_and_no_format_arguments.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="tiff-4.0.0beta4-format_not_a_string_literal_and_no_format_arguments.diff"

diff -Naurp tiff-4.0.0beta4/tools/tiffcrop.c tiff-4.0.0beta4.oden/tools/tiffcrop.c
--- tiff-4.0.0beta4/tools/tiffcrop.c	2009-02-14 20:06:15.000000000 +0100
+++ tiff-4.0.0beta4.oden/tools/tiffcrop.c	2009-08-30 18:38:06.000000000 +0200
@@ -1981,7 +1981,7 @@ main(int argc, char* argv[])
                   (dump.format == DUMP_TEXT) ? "txt" : "raw");
           if ((dump.infile = fopen(temp_filename, dump.mode)) == NULL)
             {
-	    TIFFError ("Unable to open dump file %s for writing", temp_filename);
+	    TIFFError ("Unable to open dump file %s for writing", "%s", temp_filename);
 	    exit (-1);
             }
           dump_info(dump.infile, dump.format, "Reading image","%d from %s", 
@@ -1997,7 +1997,7 @@ main(int argc, char* argv[])
                   (dump.format == DUMP_TEXT) ? "txt" : "raw");
           if ((dump.outfile = fopen(temp_filename, dump.mode)) == NULL)
             {
-	    TIFFError ("Unable to open dump file %s for writing", temp_filename);
+	    TIFFError ("Unable to open dump file %s for writing", "%s", temp_filename);
 	    exit (-1);
             }
           dump_info(dump.outfile, dump.format, "Writing image","%d from %s", 
diff -Naurp tiff-4.0.0beta4/tools/tiffgt.c tiff-4.0.0beta4.oden/tools/tiffgt.c
--- tiff-4.0.0beta4/tools/tiffgt.c	2006-03-24 15:59:55.000000000 +0100
+++ tiff-4.0.0beta4.oden/tools/tiffgt.c	2009-08-30 18:38:06.000000000 +0200
@@ -204,7 +204,7 @@ initImage(void)
         if (photo != (uint16) -1)
                 TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photo);
         if (!TIFFRGBAImageBegin(&img, tif, stoponerr, title)) {
-                TIFFError(filelist[fileindex], title);
+                TIFFError(filelist[fileindex], "%s", title);
                 TIFFClose(tif);
                 tif = NULL;
                 return -1;

--Boundary-00=_fuqmKE2iRE90Q4L
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
--Boundary-00=_fuqmKE2iRE90Q4L--
