Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx-r.one.com (mx-r.one.com [91.198.169.249])
	by mail6.local (Postfix) with ESMTP id ACA508014FAE3
	for <filtered@awaresystems.be>; Fri, 20 Sep 2013 19:08:10 +0200 (CEST)
X-Virus-Scanned: by one.com
X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "MIME-Version"
Received-SPF: pass (mx-r: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.217.178 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com [209.85.217.178])
	by mx-r.one.com (Postfix) with ESMTP id 6C6E6947018
	for <filtered@awaresystems.be>; Fri, 20 Sep 2013 17:08:10 +0000 (UTC)
Received: by mail-lb0-f178.google.com with SMTP id z5so798288lbh.9
        for <filtered@awaresystems.be>; Fri, 20 Sep 2013 10:08:10 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=delivered-to:domainkey-status:delivered-to:mime-version:in-reply-to
         :references:date:message-id:from:to:cc:subject:precedence:list-id
         :list-unsubscribe:list-archive:list-post:list-help:list-subscribe
         :content-type:mime-version:sender:errors-to;
        bh=3FngynmEajQuZ9Bh4qgWziiJ4xjOLK+UH1R2yLwO1Cg=;
        b=XvxxpL4PEy/psHOYKoLxkjt7kAgu0mpS9PqMRap+eaSfpJc/TVtftuaATSwddaGFLH
         cGUuAmgbfFm1h1on/WPxpnezWtRIsnE2Otm9RaGf/36EhDLYo4i3yF4YCNpz8ZvCR4sw
         BlwyGlEn5+oCCSaU0uL7nZxTbu4p2PUnyztwS2NoW2klBXIUPEY0hKO4JKbM4Helckpy
         k1kR7b4rOo7IRC3CLN8YId1t5TAxnVlfID5QQo+ss1QRhelhC23OP6Rk3VPvemvP6fu/
         orDUPDBGiY71I2wKkNBQjLVeMNUOthneaucdJKc3H+hHmwa4Q84jN7RqHa2MXLUIB6yQ
         z0Og==
X-Received: by 10.112.42.68 with SMTP id m4mr7247123lbl.4.1379696889946;
        Fri, 20 Sep 2013 10:08:09 -0700 (PDT)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.114.2.237 with SMTP id 13csp24329ldx;
        Fri, 20 Sep 2013 10:08:09 -0700 (PDT)
X-Received: by 10.112.168.35 with SMTP id zt3mr7107199lbb.11.1379696889144;
        Fri, 20 Sep 2013 10:08:09 -0700 (PDT)
DomainKey-Status: bad format
Received-SPF: neutral (google.com: 91.198.169.61 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=91.198.169.61;
Received: by 10.112.18.78 with POP3 id u14mf497994lbd.2;
        Fri, 20 Sep 2013 10:08:09 -0700 (PDT)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-n.one.com (mx-n.one.com [91.198.169.61])
	by mail6.local (Postfix) with ESMTP id 1FBB28014FAE2
	for <info@awaresystems.be>; Fri, 20 Sep 2013 19:04:00 +0200 (CEST)
X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "MIME-Version"
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (ks365428.kimsufi.com [94.23.4.142])
	by mx-n.one.com (Postfix) with ESMTP id 9B68F74F
	for <info@awaresystems.be>; Fri, 20 Sep 2013 17:03:58 +0000 (UTC)
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id AD06A35C031;
	Fri, 20 Sep 2013 12:03:23 -0500 (EST)
Received: from mail-pb0-f43.google.com (mail-pb0-f43.google.com
	[209.85.160.43])
	by lists.maptools.org (Postfix) with ESMTPS id 36D1F35C031
	for <tiff@lists.maptools.org>; Fri, 20 Sep 2013 11:59:08 -0500 (EST)
Received: by mail-pb0-f43.google.com with SMTP id md4so609624pbc.16
	for <tiff@lists.maptools.org>; Fri, 20 Sep 2013 09:59:06 -0700 (PDT)
MIME-Version: 1.0
X-Received: by 10.68.130.131 with SMTP id oe3mr4425619pbb.186.1379696346462;
	Fri, 20 Sep 2013 09:59:06 -0700 (PDT)
Received: by 10.66.81.41 with HTTP; Fri, 20 Sep 2013 09:59:06 -0700 (PDT)
In-Reply-To: <523C78FD.9060608@howardsilvan.com>
References: <CAEDdjHdjO-Y+bf57V0AWVSu6xoeSH7aeY4-f4C7dsujgTPPoww@mail.gmail.com>
	<CAEDdjHdLCRxZC6JrAK_8m0PXqBV_HgQoqFu7mkGEZVt5Q1w=3A@mail.gmail.com>
	<523C7322.4040803@howardsilvan.com>
	<alpine.GSO.2.01.1309201122320.3391@freddy.simplesystems.org>
	<523C78FD.9060608@howardsilvan.com>
Date: Fri, 20 Sep 2013 12:59:06 -0400
Message-ID: <CAAcuQebncNzAWnAubV6WPDjBEVxXx2V_9NHz0cSNZgW0cK44jQ@mail.gmail.com>
From: Olivier Paquet <olivier.paquet@gmail.com>
To: Lee Howard <faxguy@howardsilvan.com>
Cc: "tiff@lists.maptools.org" <tiff@lists.maptools.org>
Subject: Re: [Tiff] Vulnerabilities in libtiff 4.0.3
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>
Content-Type: multipart/mixed; boundary="===============2059311610=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

--===============2059311610==
Content-Type: multipart/alternative; boundary=e89a8ffbae51a0ff7c04e6d39601

--e89a8ffbae51a0ff7c04e6d39601
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Sep 20, 2013 at 12:34 PM, Lee Howard <faxguy@howardsilvan.com>wrote:

> On 09/20/2013 09:24 AM, Bob Friesenhahn wrote:
>  >>           snprintf(buf, sizeof(buf), "YCbCr conversion of %s",
> >
> > Please be aware that snprintf is not assured to null-terminate the
> > destination string.  Is this being handled by subsequent statements or
> > is the problem only changed?
>
> The snprintf man page says:
>
>         The functions snprintf() and vsnprintf() write at most size
> bytes (including the trailing null byte ('\0')) to str.
>
>         The trailing null byte is added to str, unless size is zero.
>
>  Is it wrong?  What am I missing?
>

Perhaps Bob confused it with strncpy which does have that problem. The man
page wording on linux is a little ambiguous but the OS X one is quite clear
and other online references also state that the null is always added by
snprintf. glibc certainly does add it.

Olivier

--e89a8ffbae51a0ff7c04e6d39601
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Fri, Sep 20, 2013 at 12:34 PM, Lee Howard <span dir=3D"=
ltr">&lt;<a href=3D"mailto:faxguy@howardsilvan.com" target=3D"_blank">faxgu=
y@howardsilvan.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quot=
e" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class=3D"im">On 09/20/2013 09:24 AM, Bob Friesenhahn wrote:<br>=A0&gt;=
&gt; =A0 =A0 =A0 =A0 =A0 snprintf(buf, sizeof(buf), &quot;YCbCr conversion =
of %s&quot;,<br>
&gt;<br>
&gt; Please be aware that snprintf is not assured to null-terminate the<br>
&gt; destination string. =A0Is this being handled by subsequent statements =
or<br>
&gt; is the problem only changed?<br>
<br>
</div>The snprintf man page says:<br>
<br>
=A0 =A0 =A0 =A0 The functions snprintf() and vsnprintf() write at most size=
<br>
bytes (including the trailing null byte (&#39;\0&#39;)) to str.<br>
<br>
=A0 =A0 =A0 =A0 The trailing null byte is added to str, unless size is zero=
.<br>
<br>=A0Is it wrong? =A0What am I missing?<br></blockquote><div><br></div><d=
iv>Perhaps Bob confused it with strncpy which does have that problem. The m=
an page wording on linux is a little ambiguous but the OS X one is quite cl=
ear and other online references also state that the null is always added by=
 snprintf. glibc certainly does add it.</div>
<div><br></div><div>Olivier</div><div><br></div></div>

--e89a8ffbae51a0ff7c04e6d39601--

--===============2059311610==
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/
--===============2059311610==--
