summaryrefslogtreecommitdiff
path: root/graphics/tiff/files/patch-libtiff-tif_fax3.c
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2004-02-07 14:16:04 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2004-02-07 14:16:04 +0000
commit2b14e84f3aadc07e6fb83267418d1258a4ce538e (patch)
tree8f1f280560a5d8b01191b925aaad0b58c0179122 /graphics/tiff/files/patch-libtiff-tif_fax3.c
parent- Fix package on amd64 arch (diff)
- fix bug in libtiff with Fax encoding
Submitted by: Bill Fenner - fix serious bug in tiffcp Submitted by: Mark McConnell
Notes
Notes: svn path=/head/; revision=100249
Diffstat (limited to 'graphics/tiff/files/patch-libtiff-tif_fax3.c')
-rw-r--r--graphics/tiff/files/patch-libtiff-tif_fax3.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/graphics/tiff/files/patch-libtiff-tif_fax3.c b/graphics/tiff/files/patch-libtiff-tif_fax3.c
new file mode 100644
index 000000000000..5e44d4e1d7d8
--- /dev/null
+++ b/graphics/tiff/files/patch-libtiff-tif_fax3.c
@@ -0,0 +1,21 @@
+--- libtiff/tif_fax3.c.orig Thu Feb 5 09:02:26 2004
++++ libtiff/tif_fax3.c Thu Feb 5 09:05:07 2004
+@@ -451,7 +451,7 @@
+ Fax3BaseState* sp = Fax3State(tif);
+ long rowbytes, rowpixels;
+ int needsRefLine;
+- Fax3CodecState* dsp = DecoderState(tif);
++ Fax3CodecState* dsp = (Fax3CodecState*) Fax3State(tif);
+ uint32 nruns;
+
+ if (td->td_bitspersample != 1) {
+@@ -1284,7 +1284,8 @@
+ sp->recvparams = 0;
+ sp->subaddress = NULL;
+
+- tif->tif_flags |= TIFF_NOBITREV; /* decoder does bit reversal */
++ if (sp->rw_mode == O_RDONLY) /* FIXME: improve for in place update */
++ tif->tif_flags |= TIFF_NOBITREV; /* decoder does bit reversal */
+ DecoderState(tif)->runs = NULL;
+ TIFFSetField(tif, TIFFTAG_FAXFILLFUNC, _TIFFFax3fillruns);
+ EncoderState(tif)->refline = NULL;