diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2017-10-17 15:13:16 +0200 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2017-10-19 07:04:41 +0000 |
commit | aae637d37ea1e9b362c6f5202a3eda6a0856df75 (patch) | |
tree | 5a50866c863859bc230bfe57d86b8237247a75f2 /src/3rdparty/libtiff/libtiff/tif_packbits.c | |
parent | 78dae6abac3909e138848c2a25495d5e893ed65a (diff) |
Update bundled libtiff to version 4.0.8+
This updates the bundled libtiff to release 4.0.8. In addition, since
after that release a number of security-related fixes has been added
to the upstream CVS repository, this commit comprises the upstream
changes of libtiff until 2017-10-10. (Corresponds to commit 46195f7
in the unofficial mirror at github.com/vadz/libtiff.git.)
[ChangeLog][Third-Party Code] Bundled libtiff was updated to version 4.0.8+
Change-Id: I9f45387ab48383ef2635d60aeda5c74828f1a6fc
Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src/3rdparty/libtiff/libtiff/tif_packbits.c')
-rw-r--r-- | src/3rdparty/libtiff/libtiff/tif_packbits.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/3rdparty/libtiff/libtiff/tif_packbits.c b/src/3rdparty/libtiff/libtiff/tif_packbits.c index d2a0165..18904b0 100644 --- a/src/3rdparty/libtiff/libtiff/tif_packbits.c +++ b/src/3rdparty/libtiff/libtiff/tif_packbits.c @@ -1,4 +1,4 @@ -/* $Id: tif_packbits.c,v 1.24 2016-09-04 21:32:56 erouault Exp $ */ +/* $Id: tif_packbits.c,v 1.26 2017-05-14 02:26:07 erouault Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -99,7 +99,7 @@ PackBitsEncode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) slop = (long)(op - lastliteral); tif->tif_rawcc += (tmsize_t)(lastliteral - tif->tif_rawcp); if (!TIFFFlushData1(tif)) - return (-1); + return (0); op = tif->tif_rawcp; while (slop-- > 0) *op++ = *lastliteral++; @@ -107,7 +107,7 @@ PackBitsEncode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) } else { tif->tif_rawcc += (tmsize_t)(op - tif->tif_rawcp); if (!TIFFFlushData1(tif)) - return (-1); + return (0); op = tif->tif_rawcp; } } @@ -244,6 +244,12 @@ PackBitsDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) (unsigned long) ((tmsize_t)n - occ)); n = (long)occ; } + if( cc == 0 ) + { + TIFFWarningExt(tif->tif_clientdata, module, + "Terminating PackBitsDecode due to lack of data."); + break; + } occ -= n; b = *bp++; cc--; |