summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerouault <erouault>2017-05-17 09:53:06 +0000
committererouault <erouault>2017-05-17 09:53:06 +0000
commitc13da5f909f928d600b0c041d107fc3f0fb64cb9 (patch)
tree3fa2591e0115fa4e353212677bdccd19025dd10f
parentf289c22e879b5ed83c74b13bfdff442eb04f7563 (diff)
downloadlibtiff-c13da5f909f928d600b0c041d107fc3f0fb64cb9.tar.gz
* libtiff/tif_pixarlog.c: PixarLogDecode(): resync tif_rawcp with
next_in and tif_rawcc with avail_in at beginning and end of function, similarly to what is done in LZWDecode(). Likely needed so that it works properly with latest chnges in tif_read.c in CHUNKY_STRIP_READ_SUPPORT mode. But untested...
-rw-r--r--ChangeLog8
-rw-r--r--libtiff/tif_pixarlog.c9
2 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 732a6b1b..d5eb6874 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2017-05-17 Even Rouault <even.rouault at spatialys.com>
+ * libtiff/tif_pixarlog.c: PixarLogDecode(): resync tif_rawcp with
+ next_in and tif_rawcc with avail_in at beginning and end of function,
+ similarly to what is done in LZWDecode(). Likely needed so that it
+ works properly with latest chnges in tif_read.c in CHUNKY_STRIP_READ_SUPPORT
+ mode. But untested...
+
+2017-05-17 Even Rouault <even.rouault at spatialys.com>
+
* libtiff/tif_lzw.c: update dec_bitsleft at beginning of LZWDecode(),
and update tif_rawcc at end of LZWDecode(). This is needed to properly
work with the latest chnges in tif_read.c in CHUNKY_STRIP_READ_SUPPORT
diff --git a/libtiff/tif_pixarlog.c b/libtiff/tif_pixarlog.c
index 4b62f4b6..f2263950 100644
--- a/libtiff/tif_pixarlog.c
+++ b/libtiff/tif_pixarlog.c
@@ -1,4 +1,4 @@
-/* $Id: tif_pixarlog.c,v 1.52 2017-05-13 18:29:38 erouault Exp $ */
+/* $Id: tif_pixarlog.c,v 1.53 2017-05-17 09:53:06 erouault Exp $ */
/*
* Copyright (c) 1996-1997 Sam Leffler
@@ -784,6 +784,10 @@ PixarLogDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
(void) s;
assert(sp != NULL);
+
+ sp->stream.next_in = tif->tif_rawcp;
+ sp->stream.avail_in = (uInt) tif->tif_rawcc;
+
sp->stream.next_out = (unsigned char *) sp->tbuf;
assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised,
we need to simplify this code to reflect a ZLib that is likely updated
@@ -829,6 +833,9 @@ PixarLogDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
return (0);
}
+ tif->tif_rawcp = sp->stream.next_in;
+ tif->tif_rawcc = sp->stream.avail_in;
+
up = sp->tbuf;
/* Swap bytes in the data if from a different endian machine. */
if (tif->tif_flags & TIFF_SWAB)