libtiff: * libtiff/tif_ojpeg.c (OJPEGWriteHeaderInfo): IJG JPEG 7 needs

https://github.com/libsdl-org/libtiff/commit/4a03585c949fb531394efe3f30299c1dcfe120ff

From 4a03585c949fb531394efe3f30299c1dcfe120ff Mon Sep 17 00:00:00 2001
From: Bob Friesenhahn <[EMAIL REDACTED]>
Date: Thu, 3 Sep 2009 20:45:10 +0000
Subject: [PATCH] * libtiff/tif_ojpeg.c (OJPEGWriteHeaderInfo): IJG JPEG 7
 needs do_fancy_upsampling=FALSE in order to read raw data.  Resolves "Bug
 2090 - OJPEG crash with libjpeg v7".
 http://bugzilla.maptools.org/show_bug.cgi?id=2090

---
 ChangeLog           | 7 +++++++
 libtiff/tif_ojpeg.c | 5 ++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 216bc9c1..22948152 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-09-03  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>
+
+	* libtiff/tif_ojpeg.c (OJPEGWriteHeaderInfo): IJG JPEG 7 needs
+	do_fancy_upsampling=FALSE in order to read raw data.  Resolves
+	"Bug 2090 - OJPEG crash with libjpeg v7".
+	http://bugzilla.maptools.org/show_bug.cgi?id=2090
+
 2009-08-30  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>
 
 	* contrib/iptcutil/iptcutil.c,
diff --git a/libtiff/tif_ojpeg.c b/libtiff/tif_ojpeg.c
index a95f6e7e..9d1e8043 100644
--- a/libtiff/tif_ojpeg.c
+++ b/libtiff/tif_ojpeg.c
@@ -1,4 +1,4 @@
-/* $Id: tif_ojpeg.c,v 1.24.2.3 2009-08-30 16:21:46 bfriesen Exp $ */
+/* $Id: tif_ojpeg.c,v 1.24.2.4 2009-09-03 20:45:10 bfriesen Exp $ */
 
 /* WARNING: The type of JPEG encapsulation defined by the TIFF Version 6.0
    specification is now totally obsolete and deprecated for new applications and
@@ -1127,6 +1127,9 @@ OJPEGWriteHeaderInfo(TIFF* tif)
 	if ((sp->subsampling_force_desubsampling_inside_decompression==0) && (sp->samples_per_pixel_per_plane>1))
 	{
 		sp->libjpeg_jpeg_decompress_struct.raw_data_out=1;
+#if JPEG_LIB_VERSION >= 70
+		sp->libjpeg_jpeg_decompress_struct.do_fancy_upsampling=FALSE;
+#endif
 		sp->libjpeg_jpeg_query_style=0;
 		if (sp->subsampling_convert_log==0)
 		{