https://github.com/libsdl-org/libtiff/commit/3dfe60b06aae3d1eb707ed822821c6ba0ad602db
From 3dfe60b06aae3d1eb707ed822821c6ba0ad602db Mon Sep 17 00:00:00 2001
From: Lee Howard <[EMAIL REDACTED]>
Date: Mon, 22 Feb 2010 19:22:52 +0000
Subject: [PATCH] * libtiff/tif_fax3.c: Don't return error on
badly-terminated MMR strips.
http://bugzilla.maptools.org/show_bug.cgi?id=2029
---
ChangeLog | 4 ++++
libtiff/tif_fax3.c | 6 +++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 57f33736..a376dadc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,10 +4,14 @@
the JPEG TIFF as is is not required in order to prevent it from
being unused and filled with invalid data. (Leave it to be
generated by later activity.)
+ http://bugzilla.maptools.org/show_bug.cgi?id=2135
* tools/tiff2pdf.c: Write the JPEG SOI headers into the TIFF strip
data rather than skipping them. This fixes the ability to view in
Acrobat Reader, Evince, and Ghostscript.
http://bugzilla.maptools.org/show_bug.cgi?id=2135
+ * libtiff/tif_fax3.c: Don't return error on badly-terminated MMR
+ strips.
+ http://bugzilla.maptools.org/show_bug.cgi?id=2029
2010-01-06 Frank Warmerdam <warmerdam@pobox.com>
diff --git a/libtiff/tif_fax3.c b/libtiff/tif_fax3.c
index b560d564..ed3fd661 100644
--- a/libtiff/tif_fax3.c
+++ b/libtiff/tif_fax3.c
@@ -1,4 +1,4 @@
-/* $Id: tif_fax3.c,v 1.43.2.5 2009-01-01 00:10:43 bfriesen Exp $ */
+/* $Id: tif_fax3.c,v 1.43.2.6 2010-02-22 19:22:52 faxguy Exp $ */
/*
* Copyright (c) 1990-1997 Sam Leffler
@@ -1439,12 +1439,12 @@ Fax4Decode(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
BADG4:
#ifdef FAX3_DEBUG
if( GetBits(13) != 0x1001 )
- fputs( "Bad RTC\n", stderr );
+ fputs( "Bad EOFB\n", stderr );
#endif
ClrBits( 13 );
(*sp->fill)(buf, thisrun, pa, lastx);
UNCACHE_STATE(tif, sp);
- return (-1);
+ return ( line ? 1 : -1); /* don't error on badly-terminated strips */
}
UNCACHE_STATE(tif, sp);
return (1);