Return-Path: <tiff-bounces@lists.osgeo.org>
Received: from mailgate110.isp.belgacom.be ([195.238.20.42])
          by mailfep008.skynet.be
          (InterMail vM.8.04.03.28.4 201-2389-100-182-103-20180124)
          with ESMTP
          id <20201211192101.YWTM7412.mailfep008.skynet.be@mailgate110.isp.belgacom.be>
          for <chris.lindelaan@skynet.be>; Fri, 11 Dec 2020 20:21:01 +0100
Authentication-Results: mx101.skynet.be; dkim=none (message not signed) header.i=none; spf=None smtp.pra=tiff-bounces@lists.osgeo.org; spf=Pass smtp.mailfrom=tiff-bounces@lists.osgeo.org; spf=Pass smtp.helo=postmaster@lists.osgeo.org
Received-SPF: None (mx101.skynet.be: no sender authenticity
  information available from domain of
  tiff-bounces@lists.osgeo.org) identity=pra;
  client-ip=140.211.15.3; receiver=mx101.skynet.be;
  envelope-from="tiff-bounces@lists.osgeo.org";
  x-sender="tiff-bounces@lists.osgeo.org";
  x-conformance=sidf_compatible
Received-SPF: Pass (mx101.skynet.be: domain of
  tiff-bounces@lists.osgeo.org designates 140.211.15.3 as
  permitted sender) identity=mailfrom; client-ip=140.211.15.3;
  receiver=mx101.skynet.be;
  envelope-from="tiff-bounces@lists.osgeo.org";
  x-sender="tiff-bounces@lists.osgeo.org";
  x-conformance=sidf_compatible; x-record-type="v=spf1";
  x-record-text="v=spf1 mx a:mail.osgeo.org a:lists.osgeo.org
  a:mail.osgeo.osuosl.org a:tracsvn.osgeo.osuosl.org -all"
Received-SPF: Pass (mx101.skynet.be: domain of
  postmaster@lists.osgeo.org designates 140.211.15.3 as
  permitted sender) identity=helo; client-ip=140.211.15.3;
  receiver=mx101.skynet.be;
  envelope-from="tiff-bounces@lists.osgeo.org";
  x-sender="postmaster@lists.osgeo.org";
  x-conformance=sidf_compatible; x-record-type="v=spf1";
  x-record-text="v=spf1 mx a:mail.osgeo.org a:lists.osgeo.org
  a:mail.osgeo.osuosl.org a:tracsvn.osgeo.osuosl.org -all"
X-Ironport-Dmarc-Check-Result: validskip
IronPort-SDR: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Pr7F85BbRXve1BYM9nmLTRMRqNZiTNr1tO?=
 =?us-ascii?q?hcx8POm6T6NDpZu4uIpY1GXpGScZ/BazIoKn+LUHbMAREATCK3OG2XnEFbnP?=
 =?us-ascii?q?yItzWUopU8tpnwic8OR7tcBxQ+EvIXDFggHcRXecsvGGl9yPjC0YhTth/c5F?=
 =?us-ascii?q?HLSc5Xv47KTKeXEay3cXCCjqhCagdOy76rSOZbfoD9xUFmbUF32YrQHE+FF8?=
 =?us-ascii?q?xMrCMkZAgppk5A61B6T3YvwATicQyg5zkUD/H+zXtUwkNuJP8g8jvh+QJ9Pl?=
 =?us-ascii?q?3RuC45i1U8g/3hgCuNa3j2N6i9WsdRESW+5C1TetvrBg1yawO1h0ltMjzJEq?=
 =?us-ascii?q?lQg7VXfmdukAbAuJFLFK0UXehebRQX3/3Se+Qw3AEWtHC83UEer7iga9MqhE?=
 =?us-ascii?q?4wfJWrtX4Fxw9zcIt/O/nLPKQQhl1Azqvcuyap0qY22wATIAAK6mzacXwMuV?=
 =?us-ascii?q?cULf8hPCWl+apr8wPn+XMLcToJXvsu5PVx+U46feOb0iX71/hEME/5Pr6DNa?=
 =?us-ascii?q?qSoHbG08mTTV43kEQTik5e+f5xy8hrNkOQUwp2nemhUi8RPM+HEjl7Ks9b9X?=
 =?us-ascii?q?zdZyGL6LqfxZNuI577EfvnQOjIs7wb0Bv9QFQZWr8U58FEJaGClVnCJJ64fr?=
 =?us-ascii?q?oE0gk2ogPwK1iCSvNTd0DTyWpVk4SE1JZymLJlCHQdDGF6aHrl4rfMuhRsh+?=
 =?us-ascii?q?GMUdBwZW0VDNIJ?=
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0HCCwDKxdNfhwMP04xigQmBT4EjgQA?=
 =?us-ascii?q?YAWNZAR4DBzaEP4kEiBsDh2uHfopjgSwzFAEBAgEBAQEBCRgBDAgCBAEBAQG?=
 =?us-ascii?q?ESAIdgWQfBgEEMwYOAg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50ZTl1JkV+EY4E0OIEMcB8uMAg7gmk/DgECAQINA?=
 =?us-ascii?q?gECAwECAgIBAQICAQECAgIBAgGOIheDToJugiaFRkABMTcCBgEJAQEDCVshh?=
 =?us-ascii?q?2iBbQEB?=
X-MGA-submission: =?us-ascii?q?MDFHMc4G6eGUxq8PWR2ueRJ8Y9rArbjUkjfB3D?=
 =?us-ascii?q?VaJRg/CAWhXhY8b65MG9PHcb/20EeA4rLBYc4dCYM0mJdEU9jkbvH9Mq?=
 =?us-ascii?q?QH4Xudz0H2GxNNnIZsWQ3Le7bIbl3z5OFy49I=3D?=
Received: from osgeo6.osgeo.osuosl.org (HELO lists.osgeo.org) ([140.211.15.3])
  by mx101.skynet.be with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 11 Dec 2020 20:20:55 +0100
Received: from osgeo6.osgeo.osuosl.org (localhost [127.0.0.1])
	by lists.osgeo.org (Postfix) with ESMTP id 95DC26144612;
	Fri, 11 Dec 2020 11:20:48 -0800 (PST)
Received: from polaris.osa.pri.ee (osa.pri.ee [213.219.84.188])
 by lists.osgeo.org (Postfix) with ESMTP id E5F03614681C
 for <tiff@lists.osgeo.org>; Fri, 11 Dec 2020 11:20:45 -0800 (PST)
Received: from localhost (localhost [127.0.0.1])
 by polaris.osa.pri.ee (Postfix) with ESMTP id D2B2D6E693
 for <tiff@lists.osgeo.org>; Fri, 11 Dec 2020 21:14:00 +0200 (EET)
X-Virus-Scanned: amavisd-new at osa.pri.ee
Received: from polaris.osa.pri.ee ([127.0.0.1])
 by localhost (osa.pri.ee [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id CBuOjc9-b+tZ for <tiff@lists.osgeo.org>;
 Fri, 11 Dec 2020 21:13:00 +0200 (EET)
Received: from TALLL011 (97-169-190-90.dyn.estpak.ee [90.190.169.97])
 (using TLSv1 with cipher AES256-SHA (256/256 bits))
 (Client did not present a certificate)
 by polaris.osa.pri.ee (Postfix) with ESMTPSA id 04C026E652
 for <tiff@lists.osgeo.org>; Fri, 11 Dec 2020 21:12:59 +0200 (EET)
To: <tiff@lists.osgeo.org>
References: <TA_bR2wBAP73tCBmxtqD3poMZ_FfgVApv5H-Gj_V-HvMHz9NL12ZeWdXRiIw719viU_OPReHQ1xOkftB4mZDH__ghu8h7SWS8h5hC1H0Ezk=@protonmail.com>
 <011001d6cfeb$bc095240$341bf6c0$@osa.pri.ee>
 <gD5wVvVo3zdBeSMBR-sZHPLACwKZY0LzRIzsNfRfrsPJiDo02kgstPR16FJu3S0FGxvhlsoK-vUZKdMZ20i1lyB5o4nhkPdoUaAD-Yfhs54=@protonmail.com>
In-Reply-To: <gD5wVvVo3zdBeSMBR-sZHPLACwKZY0LzRIzsNfRfrsPJiDo02kgstPR16FJu3S0FGxvhlsoK-vUZKdMZ20i1lyB5o4nhkPdoUaAD-Yfhs54=@protonmail.com>
Date: Fri, 11 Dec 2020 21:19:39 +0200
Message-ID: <016201d6cff2$94fe7e30$befb7a90$@osa.pri.ee>
MIME-Version: 1.0
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQKDGDsR/JmMr3Y50cafyVKJim5lKwKt/C0GAbmU0n6odnY7oA==
Content-Language: et
Subject: Re: [Tiff] SIGSEGV within TIFFGetField()
X-BeenThere: tiff@lists.osgeo.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.osgeo.org>
List-Unsubscribe: <https://lists.osgeo.org/mailman/options/tiff>,
 <mailto:tiff-request@lists.osgeo.org?subject=unsubscribe>
List-Post: <mailto:tiff@lists.osgeo.org>
List-Help: <mailto:tiff-request@lists.osgeo.org?subject=help>
List-Subscribe: <https://lists.osgeo.org/mailman/listinfo/tiff>,
 <mailto:tiff-request@lists.osgeo.org?subject=subscribe>
From: paavo--- via Tiff <tiff@lists.osgeo.org>
Reply-To: paavo@osa.pri.ee
Content-Type: multipart/mixed; boundary="===============7894333953301674419=="
Errors-To: tiff-bounces@lists.osgeo.org
Sender: "Tiff" <tiff-bounces@lists.osgeo.org>

This is a multipart message in MIME format.

--===============7894333953301674419==
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0163_01D6D003.588AF7B0"
Content-Language: et

This is a multipart message in MIME format.

------=_NextPart_000_0163_01D6D003.588AF7B0
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable

=20

Yes, in my code all custom tags are read in by the same line, and this =
has worked fine so far. But you have to know which tags are custom and =
which are not, non-custom ASCII tags require a 3-argument call and an =
extra strlen().

=20

Cheers

Paavo

=20

From: Tiff <tiff-bounces@lists.osgeo.org> On Behalf Of OnlineCop via =
Tiff
Sent: reede, 11. detsember 2020 21:08
To: Mailing List - tiff@lists.osgeo.org <tiff@lists.osgeo.org>
Subject: Re: [Tiff] SIGSEGV within TIFFGetField()

=20

This is great info; thank you. This got me past my segfault.

=20

Since custom values for TIFFGetField() for both TIFF_ASCII and =
non-TIFF_ASCII types require 4 parameters, would it be safe to remove =
the if() statement?

=20

Can I replace this:

=20

    if (tiff_field_info[i].field_type =3D=3D TIFFDataType::TIFF_ASCII) {
        status =3D TIFFGetField(tif, tiff_field_info[i].field_tag, =
&field_value);  /*** <-- this line SIGSEGV's ***/

        if (status !=3D 0) {

            field_count =3D strlen( static_cast<char*>(field_value) );

        }

    } else {

        status =3D TIFFGetField(tif, tiff_field_info[i].field_tag, =
&field_count, &field_value);

    }

=20

with simply:

=20

    status =3D TIFFGetField(tif, tiff_field_info[i].field_tag, =
&field_count, &field_value);

=20

@onlinecop

=20

=20

=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original =
Message =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90

On Friday, December 11, 2020 11:30 AM, paavo--- via Tiff =
<tiff@lists.osgeo.org <mailto:tiff@lists.osgeo.org> > wrote:

=20

=20

LibTIFF has a braindead interface where it is not possible to read =
arbitrary field values according to their type even though the type is =
encoded clearly in the TIFF file. Instead, you have to know exactly how =
to call TIFFGetField() for each standard tag. But that does not work for =
custom tags. For a custom tag you have to call TIFFGetField() with 4 =
arguments:

=20

                           std::uint32_t value_count =3D 0;

=20

                           void* raw_data =3D nullptr;

                           if(TIFFGetField(tif, tiffTag, &value_count, =
&raw_data)=3D=3D1) {

=20

and interpret the result according to TIFFField info:

=20

              const TIFFField *fip =3D ...

              if(fip->field_type =3D=3D ::TIFF_ASCII) {

                     std::string result(static_cast<const =
char*>(raw_data), value_count);

=20

HTH

Paavo

=20

=20

=20

From: Tiff <tiff-bounces@lists.osgeo.org =
<mailto:tiff-bounces@lists.osgeo.org> > On Behalf Of OnlineCop via Tiff

Sent: reede, 11. detsember 2020 17:23

To: tiff@lists.osgeo.org <mailto:tiff@lists.osgeo.org>=20

Subject: [Tiff] SIGSEGV within TIFFGetField()

=20

=20

My C++ application is terminating with SIGSEGV when I call =
TIFFGetField().

=20

I cloned libtiff's master branch from https://gitlab.com/libtiff/libtiff =
and compiled with debugging. The VERSION file there says it's version =
4.1.0.

=20

gdb reports the SIGSEGV is in tif_dir.c line 1157:

https://gitlab.com/libtiff/libtiff/-/blob/master/libtiff/tif_dir.c#L1157

=20

I'm defining almost identical tags that were reported in =
https://stackoverflow.com/a/27609465/801098 answer and registering them =
with TIFFMergeFieldInfo().

=20

Then I loop over each of the tags I've created and call TIFFGetField(). =
For TIFF_ASCII types, I pass 3 parameters: the TIFF* pointer, the =
(custom) tag, and an [out] (void*) pointer where the value will be =
stored. For non-TIFF_ASCII types, I pass 4 parameters: the TIFF* =
pointer, the (custom) tag, an [out] (uint16_t*) pointer for the count, =
and an [out] (void*) pointer for the value.

=20

The non-TIFF_ASCII types process just fine. The TIFF_ASCII types, =
however, get a segmentation fault.

=20

I've posted some abbreviated code from my files (only the pertinent =
portions that relate to TIFF) at =
https://repl.it/@OnlineCop/SigsegvInTiff#main.cpp, but if it's easier =
for me to include that in an email, let me know and I can paste it. (I =
don't believe the code compiles there, as it doesn't link to the actual =
tiff*.h files.)

=20

My code is being adapted from about 10-year-old code, so it's very =
possible that this worked with an older version of libTIFF, but has =
since changed. Any feedback is appreciated.

=20

@onlinecop

=20

=20

=20


------=_NextPart_000_0163_01D6D003.588AF7B0
Content-Type: text/html;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8"><meta =
name=3DGenerator content=3D"Microsoft Word 15 (filtered =
medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>Yes, in my =
code all custom tags are read in by the same line, and this has worked =
fine so far. But you have to know which tags are custom and which are =
not, non-custom ASCII tags require a 3-argument call and an extra =
strlen().<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
class=3DMsoNormal>Cheers<o:p></o:p></p><p =
class=3DMsoNormal>Paavo<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal><b>From:</b> =
Tiff &lt;tiff-bounces@lists.osgeo.org&gt; <b>On Behalf Of </b>OnlineCop =
via Tiff<br><b>Sent:</b> reede, 11. detsember 2020 21:08<br><b>To:</b> =
Mailing List - tiff@lists.osgeo.org =
&lt;tiff@lists.osgeo.org&gt;<br><b>Subject:</b> Re: [Tiff] SIGSEGV =
within TIFFGetField()<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><p class=3DMsoNormal>This is =
great info; thank you. This got me past my =
segfault.<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>Since custom values for&nbsp;TIFFGetField() for both =
TIFF_ASCII and non-TIFF_ASCII types require 4 parameters, would it be =
safe to remove the if() statement?<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>Can I replace this:<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal><span =
style=3D'font-size:9.0pt;font-family:Consolas'>&nbsp;&nbsp;&nbsp; if =
(tiff_field_info[i].field_type =3D=3D TIFFDataType::TIFF_ASCII) =
{<br>&nbsp; &nbsp; &nbsp; &nbsp; status =3D TIFFGetField(tif, =
tiff_field_info[i].field_tag, &amp;field_value);&nbsp; /*** &lt;-- this =
line SIGSEGV's ***/</span><o:p></o:p></p></div><div><p =
class=3DMsoNormal><span =
style=3D'font-size:9.0pt;font-family:Consolas'>&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp; if (status !=3D 0) {</span><o:p></o:p></p></div><div><p =
class=3DMsoNormal><span =
style=3D'font-size:9.0pt;font-family:Consolas'>&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; field_count =3D strlen( =
static_cast&lt;char*&gt;(field_value) =
);</span><o:p></o:p></p></div><div><p class=3DMsoNormal><span =
style=3D'font-size:9.0pt;font-family:Consolas'>&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp; }</span><o:p></o:p></p></div><div><p =
class=3DMsoNormal><span =
style=3D'font-size:9.0pt;font-family:Consolas'>&nbsp;&nbsp;&nbsp; } else =
{</span><o:p></o:p></p></div><div><p class=3DMsoNormal><span =
style=3D'font-size:9.0pt;font-family:Consolas'>&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp; status =3D TIFFGetField(tif, =
tiff_field_info[i].field_tag, &amp;field_count, =
&amp;field_value);</span><o:p></o:p></p></div><div><p =
class=3DMsoNormal><span =
style=3D'font-size:9.0pt;font-family:Consolas'>&nbsp;&nbsp;&nbsp; =
}</span><o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>with simply:<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>&nbsp; &nbsp;&nbsp;<span =
style=3D'font-size:9.0pt;font-family:Consolas'>status =3D =
TIFFGetField(tif, tiff_field_info[i].field_tag, &amp;field_count, =
&amp;field_value);</span><o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><div><p =
class=3DMsoNormal>@onlinecop<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=
=80=90 Original Message =
=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90<o:p></o:p=
></p></div><div><p class=3DMsoNormal>On Friday, December 11, 2020 11:30 =
AM, paavo--- via Tiff &lt;<a =
href=3D"mailto:tiff@lists.osgeo.org">tiff@lists.osgeo.org</a>&gt; =
wrote:<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><blockquote =
style=3D'margin-top:5.0pt;margin-bottom:5.0pt'><div><p =
style=3D'text-autospace:none'><o:p>&nbsp;</o:p></p><div><p =
class=3DMsoNormal>LibTIFF has a braindead interface where it is not =
possible to read arbitrary field values according to their type even =
though the type is encoded clearly in the TIFF file. Instead, you have =
to know exactly how to call TIFFGetField() for each standard tag. But =
that does not work for custom tags. For a custom tag you have to call =
TIFFGetField() with 4 arguments:<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:#2B91AF'>std::uint32_=
t</span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:black'> value_count =
=3D 0;</span><o:p></o:p></p></div><p><o:p>&nbsp;</o:p></p><p =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:blue'>void</span><spa=
n style=3D'font-size:9.5pt;font-family:Consolas;color:black'>* raw_data =
=3D </span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:#6F008A'>nullptr</spa=
n><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:black'>;</span><o:p><=
/o:p></p><p style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:blue'>if</span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:black'>(TIFFGetField(=
</span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:gray'>tif</span><span=
 style=3D'font-size:9.5pt;font-family:Consolas;color:black'>, =
</span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:gray'>tiffTag</span><=
span style=3D'font-size:9.5pt;font-family:Consolas;color:black'>, =
&amp;value_count, &amp;raw_data)=3D=3D1) =
{</span><o:p></o:p></p><p>&nbsp;<o:p></o:p></p><p>and interpret the =
result according to <span =
style=3D'font-size:9.5pt;font-family:Consolas;color:#2B91AF'>TIFFField =
</span>info:<o:p></o:p></p><p>&nbsp;<o:p></o:p></p><p =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:blue'>const</span><sp=
an style=3D'font-size:9.5pt;font-family:Consolas;color:black'> =
</span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:#2B91AF'>TIFFField</s=
pan><span style=3D'font-size:9.5pt;font-family:Consolas;color:black'> =
*</span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:gray'>fip =3D =
...</span><o:p></o:p></p><p style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:blue'>if</span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:black'>(</span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:gray'>fip</span><span=
 =
style=3D'font-size:9.5pt;font-family:Consolas;color:black'>-&gt;field_typ=
e =3D=3D ::</span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:darkslategray'>TIFF_A=
SCII</span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:black'>) =
{</span><o:p></o:p></p><p style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:#2B91AF'>std::string<=
/span><span style=3D'font-size:9.5pt;font-family:Consolas;color:black'> =
result(</span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:blue'>static_cast</sp=
an><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:black'>&lt;</span><sp=
an =
style=3D'font-size:9.5pt;font-family:Consolas;color:blue'>const</span><sp=
an style=3D'font-size:9.5pt;font-family:Consolas;color:black'> =
</span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:blue'>char</span><spa=
n =
style=3D'font-size:9.5pt;font-family:Consolas;color:black'>*&gt;(</span><=
span =
style=3D'font-size:9.5pt;font-family:Consolas;color:gray'>raw_data</span>=
<span style=3D'font-size:9.5pt;font-family:Consolas;color:black'>), =
</span><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:gray'>value_count</sp=
an><span =
style=3D'font-size:9.5pt;font-family:Consolas;color:black'>);</span><o:p>=
</o:p></p><p>&nbsp;<o:p></o:p></p><p>HTH<o:p></o:p></p><p>Paavo<o:p></o:p=
></p><p>&nbsp;<o:p></o:p></p><p>&nbsp;<o:p></o:p></p><p><o:p>&nbsp;</o:p>=
</p><div><p class=3DMsoNormal><b>From:</b> Tiff &lt;<a =
href=3D"mailto:tiff-bounces@lists.osgeo.org">tiff-bounces@lists.osgeo.org=
</a>&gt; <b>On Behalf Of </b>OnlineCop via =
Tiff<o:p></o:p></p></div><div><p class=3DMsoNormal><b>Sent:</b> reede, =
11. detsember 2020 17:23<o:p></o:p></p></div><div><p =
class=3DMsoNormal><b>To:</b> <a =
href=3D"mailto:tiff@lists.osgeo.org">tiff@lists.osgeo.org</a><o:p></o:p><=
/p></div><div><p class=3DMsoNormal><b>Subject:</b> [Tiff] SIGSEGV within =
TIFFGetField()<o:p></o:p></p></div><p><o:p>&nbsp;</o:p></p><p>&nbsp;<o:p>=
</o:p></p><div><p =
style=3D'background-image:initial;background-position:initial;background-=
size: =
initial;background-repeat:initial;background-attachment:initial;backgroun=
d-origin: initial;background-clip: initial'><span =
style=3D'font-size:10.5pt;font-family:"Arial",sans-serif;color:#555555;ba=
ckground:white'>My C++ application is terminating with SIGSEGV when I =
call TIFFGetField().</span><o:p></o:p></p></div><div><p =
style=3D'background-image:initial;background-position:initial;background-=
size: =
initial;background-repeat:initial;background-attachment:initial;backgroun=
d-origin: initial;background-clip: initial'><span =
style=3D'font-size:10.5pt;font-family:"Arial",sans-serif;color:#555555;ba=
ckground:white'>&nbsp;</span><o:p></o:p></p></div><div><p =
style=3D'background-image:initial;background-position:initial;background-=
size: =
initial;background-repeat:initial;background-attachment:initial;backgroun=
d-origin: initial;background-clip: initial'><span =
style=3D'font-size:10.5pt;font-family:"Arial",sans-serif;color:#555555;ba=
ckground:white'>I cloned libtiff's master branch from&nbsp;<a =
href=3D"https://gitlab.com/libtiff/libtiff" =
target=3D"_blank">https://gitlab.com/libtiff/libtiff</a>&nbsp;and =
compiled with debugging. The VERSION file there says it's version =
4.1.0.</span><o:p></o:p></p></div><div><p =
style=3D'background-image:initial;background-position:initial;background-=
size: =
initial;background-repeat:initial;background-attachment:initial;backgroun=
d-origin: initial;background-clip: initial'><span =
style=3D'font-size:10.5pt;font-family:"Arial",sans-serif;color:#555555;ba=
ckground:white'>&nbsp;</span><o:p></o:p></p></div><div><p =
style=3D'background-image:initial;background-position:initial;background-=
size: =
initial;background-repeat:initial;background-attachment:initial;backgroun=
d-origin: initial;background-clip: initial'><span =
style=3D'font-size:10.5pt;font-family:"Arial",sans-serif;color:#555555;ba=
ckground:white'>gdb reports the SIGSEGV is in tif_dir.c line =
1157:</span><o:p></o:p></p></div><div><p =
style=3D'background-image:initial;background-position:initial;background-=
size: =
initial;background-repeat:initial;background-attachment:initial;backgroun=
d-origin: initial;background-clip: initial'><span =
style=3D'font-size:10.5pt;font-family:"Arial",sans-serif;color:#555555;ba=
ckground:white'><a =
href=3D"https://gitlab.com/libtiff/libtiff/-/blob/master/libtiff/tif_dir.=
c#L1157" =
target=3D"_blank">https://gitlab.com/libtiff/libtiff/-/blob/master/libtif=
f/tif_dir.c#L1157</a></span><o:p></o:p></p></div><div><p =
style=3D'background-image:initial;background-position:initial;background-=
size: =
initial;background-repeat:initial;background-attachment:initial;backgroun=
d-origin: initial;background-clip: initial'><span =
style=3D'font-size:10.5pt;font-family:"Arial",sans-serif;color:#555555;ba=
ckground:white'>&nbsp;</span><o:p></o:p></p></div><div><p =
style=3D'background-image:initial;background-position:initial;background-=
size: =
initial;background-repeat:initial;background-attachment:initial;backgroun=
d-origin: initial;background-clip: initial'><span =
style=3D'font-size:10.5pt;font-family:"Arial",sans-serif;color:#555555;ba=
ckground:white'>I'm defining almost identical tags that were reported =
in&nbsp;<a href=3D"https://stackoverflow.com/a/27609465/801098" =
target=3D"_blank">https://stackoverflow.com/a/27609465/801098</a>&nbsp;an=
swer and registering them with =
TIFFMergeFieldInfo().</span><o:p></o:p></p></div><div><p =
style=3D'background-image:initial;background-position:initial;background-=
size: =
initial;background-repeat:initial;background-attachment:initial;backgroun=
d-origin: initial;background-clip: initial'><span =
style=3D'font-size:10.5pt;font-family:"Arial",sans-serif;color:#555555;ba=
ckground:white'>&nbsp;</span><o:p></o:p></p></div><div><p =
style=3D'background-image:initial;background-position:initial;background-=
size: =
initial;background-repeat:initial;background-attachment:initial;backgroun=
d-origin: initial;background-clip: initial'><span =
style=3D'font-size:10.5pt;font-family:"Arial",sans-serif;color:#555555;ba=
ckground:white'>Then I loop over each of the tags I've created and call =
TIFFGetField(). For TIFF_ASCII types, I pass 3 parameters: the TIFF* =
pointer, the (custom) tag, and an [out] (void*) pointer where the value =
will be stored. For non-TIFF_ASCII types, I pass 4 parameters: the TIFF* =
pointer, the (custom) tag, an [out] (uint16_t*) pointer for the count, =
and an [out] (void*) pointer for the =
value.</span><o:p></o:p></p></div><div><p =
style=3D'background-image:initial;background-position:initial;background-=
size: =
initial;background-repeat:initial;background-attachment:initial;backgroun=
d-origin: initial;background-clip: initial'><span =
style=3D'font-size:10.5pt;font-family:"Arial",sans-serif;color:#555555;ba=
ckground:white'>&nbsp;</span><o:p></o:p></p></div><div><p =
style=3D'background-image:initial;background-position:initial;background-=
size: =
initial;background-repeat:initial;background-attachment:initial;backgroun=
d-origin: initial;background-clip: initial'><span =
style=3D'font-size:10.5pt;font-family:"Arial",sans-serif;color:#555555;ba=
ckground:white'>The non-TIFF_ASCII types process just fine. The =
TIFF_ASCII types, however, get a segmentation =
fault.</span><o:p></o:p></p></div><div><p =
style=3D'background-image:initial;background-position:initial;background-=
size: =
initial;background-repeat:initial;background-attachment:initial;backgroun=
d-origin: initial;background-clip: initial'><span =
style=3D'font-size:10.5pt;font-family:"Arial",sans-serif;color:#555555;ba=
ckground:white'>&nbsp;</span><o:p></o:p></p></div><div><p =
style=3D'background-image:initial;background-position:initial;background-=
size: =
initial;background-repeat:initial;background-attachment:initial;backgroun=
d-origin: initial;background-clip: initial'><span =
style=3D'font-size:10.5pt;font-family:"Arial",sans-serif;color:#555555;ba=
ckground:white'>I've posted some abbreviated code from my files (only =
the pertinent portions that relate to TIFF) at&nbsp;<a =
href=3D"https://repl.it/@OnlineCop/SigsegvInTiff#main.cpp" =
target=3D"_blank">https://repl.it/@OnlineCop/SigsegvInTiff#main.cpp</a>, =
but if it's easier for me to include that in an email, let me know and I =
can paste it. (I don't believe the code compiles there, as it doesn't =
link to the actual tiff*.h files.)</span><o:p></o:p></p></div><div><p =
style=3D'background-image:initial;background-position:initial;background-=
size: =
initial;background-repeat:initial;background-attachment:initial;backgroun=
d-origin: initial;background-clip: initial'><span =
style=3D'font-size:10.5pt;font-family:"Arial",sans-serif;color:#555555;ba=
ckground:white'>&nbsp;</span><o:p></o:p></p></div><div><p =
style=3D'background-image:initial;background-position:initial;background-=
size: =
initial;background-repeat:initial;background-attachment:initial;backgroun=
d-origin: initial;background-clip: initial'><span =
style=3D'font-size:10.5pt;font-family:"Arial",sans-serif;color:#555555;ba=
ckground:white'>My code is being adapted from about 10-year-old code, so =
it's very possible that this worked with an older version of libTIFF, =
but has since changed. Any feedback is =
appreciated.</span><o:p></o:p></p></div><div><p =
style=3D'background-image:initial;background-position:initial;background-=
size: =
initial;background-repeat:initial;background-attachment:initial;backgroun=
d-origin: initial;background-clip: initial'><span =
style=3D'font-size:10.5pt;font-family:"Arial",sans-serif;color:#555555;ba=
ckground:white'>&nbsp;</span><o:p></o:p></p></div><div><div><p =
style=3D'background-image:initial;background-position:initial;background-=
size: =
initial;background-repeat:initial;background-attachment:initial;backgroun=
d-origin: initial;background-clip: initial'><span =
style=3D'font-size:10.5pt;font-family:"Arial",sans-serif;color:#555555;ba=
ckground:white'>@onlinecop</span><o:p></o:p></p></div></div><div><div><p>=
&nbsp;<o:p></o:p></p></div></div><div><p>&nbsp;<o:p></o:p></p></div></div=
></blockquote><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div></div></body></html>
------=_NextPart_000_0163_01D6D003.588AF7B0--


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

_______________________________________________
Tiff mailing list
Tiff@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/tiff

--===============7894333953301674419==--

