Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
X-Original-To: filtered@awaresystems.be
Delivered-To: filtered@awaresystems.be
Received: from mx-q.one.com (mx-q.one.com [91.198.169.248])
	by mail9.b-one.net (Postfix) with ESMTP id 5D59E400156
	for <filtered@awaresystems.be>; Sat,  7 Jan 2012 04:12:08 +0100 (CET)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx-q: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.160.48 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-pw0-f48.google.com (mail-pw0-f48.google.com [209.85.160.48])
	by mx-q.one.com (Postfix) with ESMTP id 85944200D7D9
	for <filtered@awaresystems.be>; Sat,  7 Jan 2012 03:12:07 +0000 (UTC)
Received: by pbaa12 with SMTP id a12so1597380pba.21
        for <filtered@awaresystems.be>; Fri, 06 Jan 2012 19:12:06 -0800 (PST)
Received: by 10.68.201.136 with SMTP id ka8mr20245332pbc.1.1325905926076;
        Fri, 06 Jan 2012 19:12:06 -0800 (PST)
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.142.215.12 with SMTP id n12cs370736wfg;
        Fri, 6 Jan 2012 19:12:05 -0800 (PST)
Received: by 10.68.203.9 with SMTP id km9mr343925pbc.7.1325905922339;
        Fri, 06 Jan 2012 19:12:02 -0800 (PST)
Received-SPF: softfail (google.com: best guess record for domain of transitioning tiff-bounces@lists.maptools.org does not designate 91.198.169.58 as permitted sender) client-ip=91.198.169.58;
Received: by 10.131.45.4 with POP3 id x4mf14998293daj.26;
        Fri, 06 Jan 2012 19:12:02 -0800 (PST)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-k.one.com (mx-k.one.com [91.198.169.58])
	by mail9.b-one.net (Postfix) with ESMTP id EF9A7400156
	for <info@awaresystems.be>; Sat,  7 Jan 2012 03:56:08 +0100 (CET)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144])
	by mx-k.one.com (Postfix) with ESMTP id 91D4A230B956
	for <info@awaresystems.be>; Sat,  7 Jan 2012 02:56:08 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 4DD311ED9CC;
	Fri,  6 Jan 2012 21:54:23 -0500 (EST)
Received: from bay0-omc1-s1.bay0.hotmail.com (bay0-omc1-s1.bay0.hotmail.com
	[65.54.190.12])
	by lists.maptools.org (Postfix) with ESMTP id AFC901ED9C8
	for <tiff@lists.maptools.org>; Fri,  6 Jan 2012 21:29:47 -0500 (EST)
Received: from BAY158-W40 ([65.54.190.61]) by bay0-omc1-s1.bay0.hotmail.com
	with Microsoft SMTPSVC(6.0.3790.4675); 
	Fri, 6 Jan 2012 18:29:46 -0800
Message-ID: <BAY158-W4042293D473B658761BFE9C19A0@phx.gbl>
Content-Type: multipart/mixed;
	boundary="_f5bd9e17-ec7a-4dba-bc5a-0fd081c253b1_"
X-Originating-IP: [67.201.57.5]
From: Ryan Wong <rwong_002@hotmail.com>
To: libtiff mailing list <tiff@lists.maptools.org>
Date: Fri, 6 Jan 2012 18:29:45 -0800
Importance: Normal
MIME-Version: 1.0
X-OriginalArrivalTime: 07 Jan 2012 02:29:46.0521 (UTC)
	FILETIME=[38D84890:01CCCCE4]
Subject: [Tiff] Proposed modification to
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

--_f5bd9e17-ec7a-4dba-bc5a-0fd081c253b1_
Content-Type: multipart/alternative;
	boundary="_ef0da6c8-2678-4b8b-968d-c93e1ff34aa7_"

--_ef0da6c8-2678-4b8b-968d-c93e1ff34aa7_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable








This is a proposed modification to Tom Lane's patch in http://bugzilla.mapt=
ools.org/show_bug.cgi?id=3D2297 We have a customer-submitted image which ca=
nnot be decoded once we applied Tom's patch (http://bugzilla.maptools.org/a=
ttachment.cgi?id=3D443). The image contains privacy information which canno=
t be shared. Our investigation leads us to propose another patch=2C which r=
elaxes the catch condition slightly. The main change is that in addition to=
 allowing (treating as valid) the case of equality at the first element of =
the current row=2C it is also allowed if it is at the second element of the=
 row. Namely=2C fromif (b1 < (int) (a0 + TabEnt->Param) || pa !=3D thisrun)=
 { unexpected(...)=3B }toif (b1 < (int) (a0 + TabEnt->Param) || (pa !=3D th=
isrun && pa !=3D thisrun + 1)) { unexpected(...)=3B } In our customer-submi=
tted image=2C the code "V0 VL(...)" was occasionally found at the beginning=
 of the row. In this particular image=2C the value of VL is always equal to=
 (b1 - a0)=2C thus falling into the equality case (that is=2C it was not tr=
ying to move backwards). Furthermore=2C "a0" is always zero when this code =
is seen. If my interpretation is correct=2C the following would also work:i=
f (b1 < (int) (a0 + TabEnt->Param) || (pa !=3D thisrun && pa !=3D thisrun +=
 1 || a0 !=3D 0)) { unexpected(...)=3B } Your opinions are greatly apprecia=
ted. In particular=2C we would like to know if any risk can be identified f=
rom this code change. Regards=2Crwong_002@hotmail.com=20
 		 	   		  =

--_ef0da6c8-2678-4b8b-968d-c93e1ff34aa7_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
</head>
<body class=3D'hmmessage'><div dir=3D'ltr'>


<style><!--
.hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Tahoma
}
--></style>
<div dir=3D"ltr">


</div><div dir=3D"ltr">This is a proposed modification to Tom Lane's patch =
in <a href=3D"http://bugzilla.maptools.org/show_bug.cgi?id=3D2297">http://b=
ugzilla.maptools.org/show_bug.cgi?id=3D2297</a></div><div dir=3D"ltr">&nbsp=
=3B</div><div dir=3D"ltr">We have a customer-submitted image which cannot b=
e decoded once we applied Tom's patch (<a href=3D"http://bugzilla.maptools.=
org/attachment.cgi?id=3D443">http://bugzilla.maptools.org/attachment.cgi?id=
=3D443</a>). The image contains privacy information which cannot be shared.=
 Our investigation leads us to propose another patch=2C which relaxes the c=
atch condition slightly.</div><div dir=3D"ltr">&nbsp=3B</div><div dir=3D"lt=
r">The main change is that in addition to allowing (treating as valid) the =
case of equality at the first element of the current row=2C it is also allo=
wed if it is at the second element of the row.</div><div dir=3D"ltr">&nbsp=
=3B</div><div dir=3D"ltr">Namely=2C from</div><div dir=3D"ltr">if (b1 &lt=
=3B (int) (a0 + TabEnt-&gt=3BParam) || pa !=3D thisrun) { unexpected(...)=
=3B }</div><div dir=3D"ltr">to</div><div dir=3D"ltr">if (b1 &lt=3B (int) (a=
0 + TabEnt-&gt=3BParam) || (pa !=3D thisrun &amp=3B&amp=3B pa !=3D thisrun =
+ 1)) { unexpected(...)=3B }</div><div dir=3D"ltr">&nbsp=3B</div><div dir=
=3D"ltr">In our customer-submitted image=2C the code "V0 VL(...)" was occas=
ionally found at the beginning of the row. In this particular image=2C the =
value of VL is always equal to (b1 - a0)=2C thus falling into the equality =
case (that is=2C it was not trying to move backwards). Furthermore=2C "a0" =
is always zero when this code is seen.</div><div dir=3D"ltr">&nbsp=3B</div>=
<div dir=3D"ltr">If my interpretation is correct=2C the following would als=
o work:</div><div dir=3D"ltr"><div dir=3D"ltr">if (b1 &lt=3B (int) (a0 + Ta=
bEnt-&gt=3BParam) || (pa !=3D thisrun &amp=3B&amp=3B pa !=3D thisrun + 1 ||=
 a0 !=3D 0)) { unexpected(...)=3B }</div><div dir=3D"ltr">&nbsp=3B</div><di=
v dir=3D"ltr">Your opinions are greatly appreciated. In particular=2C we wo=
uld like to know if any risk can be identified from this code change.</div>=
<div dir=3D"ltr">&nbsp=3B</div><div dir=3D"ltr">Regards=2C</div><div dir=3D=
"ltr"><a href=3D"mailto:rwong_002@hotmail.com">rwong_002@hotmail.com</a></d=
iv><div dir=3D"ltr">&nbsp=3B</div></div>
 		 	   		  </div></body>
</html>=

--_ef0da6c8-2678-4b8b-968d-c93e1ff34aa7_--

--_f5bd9e17-ec7a-4dba-bc5a-0fd081c253b1_
Content-Type: text/plain
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="patch_395_fax3_h.txt"

LS0tIGxpYnRpZmYtM185XzVfcjIyNzU5Nlxzb3VyY2VcbGlidGlmZlx0aWZfZmF4My5oCTIwMTIt
MDEtMDYgMTc6NDA6NTkuNzgwNjk3ODAwIC0wODAwDQorKysgbGlidGlmZi0zXzlfNVxzb3VyY2Vc
bGlidGlmZlx0aWZfZmF4My5oCTIwMTItMDEtMDYgMTc6NDk6NTAuMTAxNzYwMDAwIC0wODAwDQpA
QCAtNDc2LDEzICs0NzYsMTMgQEANCiAJICAgIFNFVFZBTFVFKGIxIC0gYTAgKyBUYWJFbnQtPlBh
cmFtKTsJCQkJXA0KIAkgICAgYjEgKz0gKnBiKys7CQkJCQkJXA0KIAkgICAgYnJlYWs7CQkJCQkJ
CVwNCiAJY2FzZSBTX1ZMOgkJCQkJCQlcDQogCSAgICBDSEVDS19iMTsJCQkJCQkJXA0KIAkgICAg
aWYgKGIxIDw9IChpbnQpIChhMCArIFRhYkVudC0+UGFyYW0pKSB7CQkJXA0KLQkJaWYgKGIxIDwg
KGludCkgKGEwICsgVGFiRW50LT5QYXJhbSkgfHwgcGEgIT0gdGhpc3J1bikgewlcDQorCQlpZiAo
YjEgPCAoaW50KSAoYTAgKyBUYWJFbnQtPlBhcmFtKSB8fCAocGEgIT0gdGhpc3J1biAmJiBwYSAh
PSB0aGlzcnVuICsgMSkpIHsJXA0KIAkJICAgIHVuZXhwZWN0ZWQoIlZMIiwgYTApOwkJCQlcDQog
CQkgICAgZ290byBlb2wyZDsJCQkJCQlcDQogCQl9CQkJCQkJCVwNCiAJICAgIH0JCQkJCQkJCVwN
CiAJICAgIFNFVFZBTFVFKGIxIC0gYTAgLSBUYWJFbnQtPlBhcmFtKTsJCQkJXA0KIAkgICAgYjEg
LT0gKi0tcGI7CQkJCQkJXA0K

--_f5bd9e17-ec7a-4dba-bc5a-0fd081c253b1_
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/
--_f5bd9e17-ec7a-4dba-bc5a-0fd081c253b1_--
