1
0
mirror of https://gitlab.com/libtiff/libtiff.git synced 2026-10-26 07:59:18 +03:00

Commit Graph

  • 5bf07456da * libtiff/tif_jpeg.c: add compatibility with libjpeg-turbo 1.5.2 that honours max_memory_to_use > 0. Cf https://github.com/libjpeg-turbo/libjpeg-turbo/issues/162 Even Rouault 2017-10-17 19:04:47 +00:00
  • 7c1a32bb9f * nmake.opt: support a DEBUG=1 option, so as to adjust OPTFLAGS and use /MDd runtime in debug mode. Even Rouault 2017-10-10 14:39:43 +00:00
  • 76a2b9d619 * tools/tiffset.c: fix setting a single value for the ExtraSamples tag (and other tags with variable number of values). So 'tiffset -s ExtraSamples 1 X'. This only worked when setting 2 or more values, but not just one. Even Rouault 2017-10-01 17:38:12 +00:00
  • 28bf544f33 * libtiff/libtiff.def: add TIFFReadRGBAStripExt and TIFFReadRGBATileExt Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2735 Even Rouault 2017-09-29 11:18:50 +00:00
  • dfbdd88c5a dummy commit to check CVS is working Even Rouault 2017-09-22 13:55:49 +00:00
  • 46c51095d6 * libtiff/tif_dirread.c: add NULL check to avoid likely false positive null-pointer dereference warning by CLang Static Analyzer. Even Rouault 2017-09-09 21:44:42 +00:00
  • c4a2f72e9d * libtiff/tiffiop.h, tif_aux.c: redirect SeekOK() macro to a _TIFFSeekoK() function that checks if the offset is not bigger than INT64_MAX, so as to avoid a -1 error return code of TIFFSeekFile() to match a required seek to UINT64_MAX/-1. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2726 Adapted from proposal by Nicolas Ruff. Even Rouault 2017-09-07 14:02:52 +00:00
  • 71ce9dbe19 Fix signed vs unsigned comparison Even Rouault 2017-08-29 08:08:10 +00:00
  • 860943a370 * libtiff/tif_jpeg.c: accept reading the last strip of a JPEG compressed file if the codestream height is larger than the truncated height of the strip. Emit a warning in this situation since this is non compliant. Even Rouault 2017-08-29 07:30:07 +00:00
  • 6dac309a97 * test/Makefile.am: add missing reference to images/quad-lzw-compat.tiff to fix "make distcheck". Patch by Roger Leigh Even Rouault 2017-08-28 15:43:14 +00:00
  • fe7f0e43ee * libtiff/tif_dirwrite.c: replace assertion to tag value not fitting on uint32 when selecting the value of SubIFD tag by runtime check (in TIFFWriteDirectoryTagSubifd()). Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2728 Reported by team OWL337 Even Rouault 2017-08-23 13:33:42 +00:00
  • 4958e19fae * libtiff/tif_dirwrite.c: replace assertion related to not finding the SubIFD tag by runtime check. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2727 Reported by team OWL337 Even Rouault 2017-08-23 13:21:41 +00:00
  • 8ad1c70dc1 * libtiff/tif_luv.c: further reduce memory requirements for temporary buffer when RowsPerStrip >= image_length in LogLuvInitState() and LogL16InitState(). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2700 Credit to OSS Fuzz Even Rouault 2017-07-24 12:47:30 +00:00
  • 06155116f6 * libtiff/tif_getimage.c: fix fromskew computation when to-be-skipped pixel number is not a multiple of the horizontal subsampling, and also in some other cases. Impact putcontig8bitYCbCr44tile, putcontig8bitYCbCr42tile, putcontig8bitYCbCr41tile, putcontig8bitYCbCr21tile and putcontig8bitYCbCr12tile Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2637 (discovered by Agostino Sarubbo) and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2691 (credit to OSS Fuzz) Even Rouault 2017-07-24 10:34:14 +00:00
  • ec4d8e0895 * libtiff/tif_getimage.c: gtTileContig() and gtTileSeparate(): properly break from loops on error when stoponerr is set, instead of going on iterating on row based loop. Even Rouault 2017-07-24 09:52:23 +00:00
  • c3980af085 * libtiff/tif_luv.c: LogLuvInitState(): avoid excessive memory allocation when RowsPerStrip tag is missing. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2683 Credit to OSS-Fuzz Even Rouault 2017-07-18 19:45:11 +00:00
  • 2b14fd7f6e Fix warning with x86_64-w64-mingw32-g++ Even Rouault 2017-07-15 14:27:50 +00:00
  • 024b2fa26a Fix signed vs unsigned comparison warning on Windows Even Rouault 2017-07-15 13:51:22 +00:00
  • d99c422dbf * libtiff/tif_read.c: add protection against excessive memory allocation attempts in TIFFReadDirEntryArray() on short files. Effective for mmap'ed case. And non-mmap'ed case, but restricted to 64bit builds. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2675 Even Rouault 2017-07-15 13:23:09 +00:00
  • 02271af177 * libtiff/tif_read.c: in TIFFFetchStripThing(), only grow the arrays that hold StripOffsets/StripByteCounts, when they are smaller than the expected number of striles, up to 1 million striles, and error out beyond. Can be tweaked by setting the environment variable LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT. This partially goes against a change added on 2002-12-17 to accept those arrays of wrong sizes, but is needed to avoid denial of services. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2350 Credit to OSS Fuzz Even Rouault 2017-07-15 13:19:56 +00:00
  • 5b7f711586 * libtiff/tif_read.c: TIFFFillStrip() / TIFFFillTile(). Complementary fix for http://bugzilla.maptools.org/show_bug.cgi?id=2708 in the isMapped() case, so as to avoid excessive memory allocation when we need a temporary buffer but the file is truncated. Even Rouault 2017-07-15 12:33:25 +00:00
  • 979751c407 * tools/tiff2pdf.c: prevent heap buffer overflow write in "Raw" mode on PlanarConfig=Contig input images. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2715 Reported by team OWL337 Even Rouault 2017-07-15 11:13:46 +00:00
  • 2ac7bddb78 * libtiff/tif_dir.c: avoid potential null pointer dereference in _TIFFVGetField() on corrupted TIFFTAG_NUMBEROFINKS tag instance. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2713 Even Rouault 2017-07-11 21:38:04 +00:00
  • c8665b503c * libtiff/tif_lzw.c: fix potential out-of-buffer read on 1-byte LZW strips. Crashing issue only on memory mapped files, where the strip offset is the last byte of the file, and the file size is a multiple of one page size on the CPU architecture (typically 4096). Credit to myself :-) Even Rouault 2017-07-11 10:54:29 +00:00
  • abc862b594 * test/tiffcp-lzw-compat.sh, test/images/quad-lzw-compat.tiff: new files to test old-style LZW decompression * test/common.sh, Makefile.am, CMakeList.txt: updated with above Even Rouault 2017-07-11 09:20:31 +00:00
  • 222083301a * refresh autoconf/make stuff with what is on Ubuntu 16.04 (minor changes) Even Rouault 2017-07-11 09:10:28 +00:00
  • 311af0ba08 * libtiff/tif_lzw.c: fix 4.0.8 regression in the decoding of old-style LZW compressed files. Even Rouault 2017-07-11 08:55:07 +00:00
  • d69a373ecf * libtiff/tif_pixarlog.c: avoid excessive memory allocation on decoding when RowsPerStrip tag is not defined (and thus td_rowsperstrip == UINT_MAX) Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2554 Credit to OSS Fuzz Even Rouault 2017-07-10 10:40:27 +00:00
  • 9129c40f98 Commit files that should have gone with previous commit Even Rouault 2017-07-04 13:28:42 +00:00
  • c2be1447d9 * libtiff/tif_read.c, tiffiop.h: add a _TIFFReadEncodedTileAndAllocBuffer() and _TIFFReadTileAndAllocBuffer() variants of TIFFReadEncodedTile() and TIFFReadTile() that allocates the decoded buffer only after a first successful TIFFFillTile(). This avoids excessive memory allocation on corrupted files. * libtiff/tif_getimage.c: use _TIFFReadTileAndAllocBuffer(). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2470 Credit to OSS Fuzz. Even Rouault 2017-07-04 13:27:45 +00:00
  • 733109e510 * libtiff/tif_error.c, tif_warning.c: correctly use va_list when both an old-style and new-style warning/error handlers are installed. Patch by Paavo Helde (sent on the mailing list) Even Rouault 2017-07-04 12:54:42 +00:00
  • 8eff533db2 * libtiff/tif_read.c: TIFFStartTile(): set tif_rawcc to tif_rawdataloaded when it is set. Similarly to TIFFStartStrip(). This issue was revealed by the change of 2017-06-30 in TIFFFileTile(), limiting the number of bytes read. But it could probably have been hit too in CHUNKY_STRIP_READ_SUPPORT mode previously ? Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2454 Credit to OSS Fuzz Even Rouault 2017-07-02 14:13:39 +00:00
  • 0f83a86b7b * man: update documentation regarding SubIFD tag and TIFFSetSubDirectory() data type. Patch by Eric Piel Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2671 Even Rouault 2017-06-30 17:40:02 +00:00
  • 170f9a6019 Fix module names in error message Even Rouault 2017-06-30 17:31:45 +00:00
  • 3cb621f5cf * libtiff/tif_dirwrite.c: in TIFFWriteDirectoryTagCheckedXXXX() functions associated with LONG8/SLONG8 data type, replace assertion that the file is BigTIFF, by a non-fatal error. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2712 Reported by team OWL337 Even Rouault 2017-06-30 17:29:44 +00:00
  • 5ba0b3116f * libtiff/tif_read.c, tiffiop.h: add a _TIFFReadEncodedStripAndAllocBuffer() function, variant of TIFFReadEncodedStrip() that allocates the decoded buffer only after a first successful TIFFFillStrip(). This avoids excessive memory allocation on corrupted files. * libtiff/tif_getimage.c: use _TIFFReadEncodedStripAndAllocBuffer(). Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2708 and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2433 . Credit to OSS Fuzz Even Rouault 2017-06-30 13:11:18 +00:00
  • 12bb476389 * libtiff/tif_read.c: TIFFFillTile(): add limitation to the number of bytes read in case td_stripbytecount[strip] is bigger than reasonable, so as to avoid excessive memory allocation (similarly to what was done for TIFFFileStrip() on 2017-05-10) Even Rouault 2017-06-30 11:29:22 +00:00
  • 385edd37e9 * libtiff/tiffiop.h, libtiff/tif_jpeg.c, libtiff/tif_jpeg_12.c, libtiff/tif_read.c: make TIFFReadScanline() works in CHUNKY_STRIP_READ_SUPPORT mode with JPEG stream with multiple scans. Also make configurable through a LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER environment variable the maximum number of scans allowed. Defaults to 100. Even Rouault 2017-06-29 07:37:12 +00:00
  • 976774deac * libtiff/tif_dirread.c: in TIFFReadDirEntryFloat(), check that a double value can fit in a float before casting. Patch by Nicolas RUFF Even Rouault 2017-06-27 13:44:44 +00:00
  • ede7b68218 * libtiff/tif_jbig.c: fix memory leak in error code path of JBIGDecode() Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2706 Reported by team OWL337 Even Rouault 2017-06-26 15:19:59 +00:00
  • a85d5f09dd * libjpeg/tif_jpeg.c: error out at decoding time if anticipated libjpeg memory allocation is above 100 MB. libjpeg in case of multiple scans, which is allowed even in baseline JPEG, if components are spread over several scans and not interleavedin a single one, needs to allocate memory (or backing store) for the whole strip/tile. See http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf This limitation may be overriden by setting the LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC environment variable, or recompiling libtiff with a custom value of TIFF_LIBJPEG_LARGEST_MEM_ALLOC macro. Even Rouault 2017-06-24 15:33:28 +00:00
  • b1ee48b775 * libtiff/tif_jpeg.c: add anti-denial of service measure to avoid excessive CPU consumption on progressive JPEGs with a huge number of scans. See http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf Note: only affects libtiff since 2014-12-29 where support of non-baseline JPEG was added. Even Rouault 2017-06-24 13:03:25 +00:00
  • df51988637 * libtiff/tiffiop.h: add TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW macro to disable CLang warnings raised by -fsanitize=undefined,unsigned-integer-overflow * libtiff/tif_predict.c: decorate legitimate functions where unsigned int overflow occur with TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW * libtiff/tif_dirread.c: avoid unsigned int overflow in EstimateStripByteCounts() and BYTECOUNTLOOKSBAD when file is too short. * libtiff/tif_jpeg.c: avoid (harmless) unsigned int overflow on tiled images. * libtiff/tif_fax3.c: avoid unsigned int overflow in Fax3Encode2DRow(). Could potentially be a bug with huge rows. * libtiff/tif_getimage.c: avoid many (harmless) unsigned int overflows. Even Rouault 2017-06-18 10:31:50 +00:00
  • 7057734d98 * libtiff/tif_dirread.c: TIFFFetchStripThing(): limit the number of items read in StripOffsets/StripByteCounts tags to the number of strips to avoid excessive memory allocation. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2215 Credit to OSS Fuzz Even Rouault 2017-06-12 19:13:49 +00:00
  • 56d802d409 Reference GDAL ticket Even Rouault 2017-06-12 10:48:25 +00:00
  • 1cdea8b9e9 * libtiff/tif_dirread.c: fix regression of libtiff 4.0.8 in ChopUpSingleUncompressedStrip() regarding update of newly single-strip uncompressed files whose bytecount is 0. Before the change of 2016-12-03, the condition bytecount==0 used to trigger an early exit/disabling of strip chop. Re-introduce that in update mode. Otherwise this cause later incorrect setting for the value of StripByCounts/StripOffsets. Even Rouault 2017-06-12 10:45:35 +00:00
  • ea6228c185 * .appveyor.yml, .travis.yml, build/travis-ci: apply patches 0001-ci-Travis-script-improvements.patch and 0002-ci-Invoke-helper-script-via-shell.patch by Roger Leigh (sent to mailing list) Even Rouault 2017-06-09 22:07:08 +00:00
  • fb19084f4d Re-add build/travis-ci with execution bit Even Rouault 2017-06-09 11:04:33 +00:00
  • ff179125e2 remove build/travis-ci to re-add it with +x bit Even Rouault 2017-06-09 11:03:51 +00:00
  • f2a3b02040 * .travis.yml, build/travis-ci: new files from 0001-ci-Add-Travis-support-for-Linux-builds-with-Autoconf.patch by Roger Leigh (sent to mailing list on 2017-06-08) This patch adds support for the Travis-CI service. Even Rouault 2017-06-08 20:46:10 +00:00
  • 1d658302f8 * libtiff/tif_swab.c: if DISABLE_CHECK_TIFFSWABMACROS is defined, do not do the #ifdef TIFFSwabXXX checks. Make it easier for GDAL to rename the symbols of its internal libtiff copy. Even Rouault 2017-06-08 16:39:50 +00:00
  • 6281927e03 * libtiff/tif_dirinfo.c, tif_dirread.c: add _TIFFCheckFieldIsValidForCodec(), and use it in TIFFReadDirectory() so as to ignore fields whose tag is a codec-specified tag but this codec is not enabled. This avoids TIFFGetField() to behave differently depending on whether the codec is enabled or not, and thus can avoid stack based buffer overflows in a number of TIFF utilities such as tiffsplit, tiffcmp, thumbnail, etc. Patch derived from 0063-Handle-properly-CODEC-specific-tags.patch (http://bugzilla.maptools.org/show_bug.cgi?id=2580) by Raphaël Hertzog. Fixes: http://bugzilla.maptools.org/show_bug.cgi?id=2580 http://bugzilla.maptools.org/show_bug.cgi?id=2693 http://bugzilla.maptools.org/show_bug.cgi?id=2625 (CVE-2016-10095) http://bugzilla.maptools.org/show_bug.cgi?id=2564 (CVE-2015-7554) http://bugzilla.maptools.org/show_bug.cgi?id=2561 (CVE-2016-5318) http://bugzilla.maptools.org/show_bug.cgi?id=2499 (CVE-2014-8128) http://bugzilla.maptools.org/show_bug.cgi?id=2441 http://bugzilla.maptools.org/show_bug.cgi?id=2433 Even Rouault 2017-06-01 12:44:04 +00:00
  • ed38dcc52c * libtiff/tif_getimage.c: initYCbCrConversion(): stricter validation for refBlackWhite coefficients values. To avoid invalid float->int32 conversion (when refBlackWhite[0] == 2147483648.f) Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1907 Credit to OSS Fuzz Even Rouault 2017-05-29 11:29:06 +00:00
  • 4d3c3eec0c Fix date in changelog entry Even Rouault 2017-05-29 10:14:26 +00:00
  • 2b3a489164 * libtiff/tif_color.c: TIFFYCbCrToRGBInit(): stricter clamping to avoid int32 overflow in TIFFYCbCrtoRGB(). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1844 Credit to OSS Fuzz Even Rouault 2017-05-29 10:12:54 +00:00
  • 84e1f1b66d libtiff 4.0.8 released v4.0.8 Bob Friesenhahn 2017-05-21 19:10:50 +00:00
  • c714d5b5a7 html/v4.0.8.html: Add description of changes targeting the 4.0.8 release. Bob Friesenhahn 2017-05-21 17:47:46 +00:00
  • 1a690c0e10 * libtiff/tif_getimage.c: initYCbCrConversion(): stricter validation for refBlackWhite coefficients values. To avoid invalid float->int32 conversion. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1718 Credit to OSS Fuzz Even Rouault 2017-05-20 11:29:02 +00:00
  • 3d5081d29b * libtiff/tif_getimage.c: initYCbCrConversion(): check luma[1] is not zero to avoid division by zero. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1665 Credit to OSS Fuzz Even Rouault 2017-05-18 06:44:35 +00:00
  • cbe0307490 * libtiff/tif_read.c: _TIFFVSetField(): fix outside range cast of double to float. Credit to Google Autofuzz project Even Rouault 2017-05-17 21:54:04 +00:00
  • bda5be3a14 * libtiff/tif_getimage.c: initYCbCrConversion(): add basic validation of luma and refBlackWhite coefficients (just check they are not NaN for now), to avoid potential float to int overflows. Fixes ://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1663 Credit to OSS Fuzz Even Rouault 2017-05-17 13:48:34 +00:00
  • f277dbaff0 * 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... Even Rouault 2017-05-17 09:53:06 +00:00
  • 3f72698b8a * 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 mode. Even Rouault 2017-05-17 09:38:58 +00:00
  • 352c653057 * libtiff/tif_luv.c: LogL16InitState(): avoid excessive memory allocation when RowsPerStrip tag is missing. Credit to OSS-Fuzz (locally run, on GDAL) Even Rouault 2017-05-14 10:17:27 +00:00
  • 8d4e459102 * libtiff/tif_packbits.c: fix out-of-buffer read in PackBitsDecode() Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1563 Credit to OSS-Fuzz Even Rouault 2017-05-14 02:26:07 +00:00
  • 99e8fb373e * libtiff/tif_pixarlog.c, tif_luv.c: avoid potential int32 overflows in multiply_ms() and add_ms(). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1558 Credit to OSS-Fuzz Even Rouault 2017-05-13 18:29:38 +00:00
  • 0a6763b5a0 * libtiff/tif_color.c: avoid potential int32 overflow in TIFFYCbCrToRGBInit() Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1533 Credit to OSS-Fuzz Even Rouault 2017-05-13 18:17:34 +00:00
  • 0a5c524577 * libtiff/tif_read.c: update tif_rawcc in CHUNKY_STRIP_READ_SUPPORT mode with tif_rawdataloaded when calling TIFFStartStrip() or TIFFFillStripPartial(). This avoids reading beyond tif_rawdata when bytecount > tif_rawdatasize. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1545. Credit to OSS-Fuzz Even Rouault 2017-05-13 15:34:06 +00:00
  • 2d7b1f8c16 * libtiff/tif_read.c: TIFFFillStripPartial(): avoid excessive memory allocation in case of shorten files. Only effective on 64 bit builds. Credit to OSS-Fuzz (locally run, on GDAL) Even Rouault 2017-05-12 21:12:24 +00:00
  • 76084fb831 * libtiff/tif_read.c: TIFFFillStripPartial() / TIFFSeek(), avoid potential integer overflows with read_ahead in CHUNKY_STRIP_READ_SUPPORT mode. Should especially occur on 32 bit platforms. Even Rouault 2017-05-12 20:16:37 +00:00
  • 80ee713d88 Rename variable added in previous commit to avoid symbol clash Even Rouault 2017-05-10 19:54:54 +00:00
  • c9a6cfc51a * libtiff/tif_read.c: TIFFFillStrip() and TIFFFillTile(): avoid excessive memory allocation in case of shorten files. Only effective on 64 bit builds and non-mapped cases. Credit to OSS-Fuzz (locally run, on GDAL) Even Rouault 2017-05-10 19:38:49 +00:00
  • 328189565b * libtiff/tif_zip.c, tif_pixarlog.c, tif_predict.c: fix memory leak when the underlying codec (ZIP, PixarLog) succeeds its setupdecode() method, but PredictorSetup fails. Credit to OSS-Fuzz (locally run, on GDAL) Even Rouault 2017-05-10 15:21:16 +00:00
  • 8fb8265260 * libtiff/tif_read.c: TIFFFillStrip(): add limitation to the number of bytes read in case td_stripbytecount[strip] is bigger than reasonable, so as to avoid excessive memory allocation. Even Rouault 2017-05-10 13:37:19 +00:00
  • d606ea22bb * tools/tiff2bw.c: close TIFF handle in error code path. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2677 Even Rouault 2017-04-28 18:08:47 +00:00
  • fa55777370 * litiff/tif_fax3.c: avoid crash in Fax3Close() on empty file. Patch by Alan Coopersmith + complement by myself. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2673 * tools/fax2tiff.c: emit appropriate message if the input file is empty. Patch by Alan Coopersmith. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2672 Even Rouault 2017-04-27 19:50:01 +00:00
  • bb30ee4f09 * libtiff/tif_ojpeg.c: fix potential memory leak in OJPEGReadHeaderInfoSecTablesQTable, OJPEGReadHeaderInfoSecTablesDcTable and OJPEGReadHeaderInfoSecTablesAcTable Patch by Nicolás Peña. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2670 Even Rouault 2017-04-27 17:29:26 +00:00
  • 697bfd9f39 * libtiff/tif_dirread.c: fix memory leak in non DEFER_STRILE_LOAD mode (ie default) when there is both a StripOffsets and TileOffsets tag, or a StripByteCounts and TileByteCounts Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2689 * tools/tiff2ps.c: call TIFFClose() in error code paths. Even Rouault 2017-04-27 15:46:22 +00:00
  • 8a752e1e3a * libtiff/tif_fax3.c, tif_predict.c, tif_getimage.c: fix GCC 7 -Wimplicit-fallthrough warnings. Even Rouault 2017-02-25 17:05:12 +00:00
  • 19a159d7c4 * libtiff/tif_pixarlog.c: fix memory leak in error code path of PixarLogSetupDecode(). Patch by Nicolás Peña. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2665 Even Rouault 2017-02-18 20:30:26 +00:00
  • 09a7433335 * libtiff/tif_lzw.c: in LZWPostEncode(), increase, if necessary, the code bit-width after flushing the remaining code and before emitting the EOI code. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=1982 Even Rouault 2017-02-18 18:46:00 +00:00
  • 62473b596b * libtiff/tif_jpeg.c: only run JPEGFixupTagsSubsampling() if the YCbCrSubsampling tag is not explicitly present. This helps a bit to reduce the I/O amount when te tag is present (especially on cloud hosted files). Even Rouault 2017-01-31 13:02:27 +00:00
  • 55e5962794 * tools/raw2tiff.c: avoid integer division by zero. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2631 Even Rouault 2017-01-14 13:12:33 +00:00
  • ab7f27a984 * libtiff/tif_ojpeg.c: fix leak in OJPEGReadHeaderInfoSecTablesQTable, OJPEGReadHeaderInfoSecTablesDcTable and OJPEGReadHeaderInfoSecTablesAcTable Even Rouault 2017-01-12 19:23:20 +00:00
  • ad7aea728d * libtiff/tif_ojpeg.c: fix leak in OJPEGReadHeaderInfoSecTablesAcTable when read fails. Patch by Nicolás Peña. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2659 Even Rouault 2017-01-12 17:43:25 +00:00
  • d043ca1be9 * libtiff/tif_luv.c, tif_lzw.c, tif_packbits.c: return 0 in Encode functions instead of -1 when TIFFFlushData1() fails. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2130 Even Rouault 2017-01-11 20:33:35 +00:00
  • 480167a350 * tools/tiffcp.c: error out cleanly in cpContig2SeparateByRow and cpSeparate2ContigByRow if BitsPerSample != 8 to avoid heap based overflow. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2656 and http://bugzilla.maptools.org/show_bug.cgi?id=2657 Even Rouault 2017-01-11 19:25:44 +00:00
  • f5858f50b5 Fix commit message Even Rouault 2017-01-11 19:03:18 +00:00
  • 33e002a170 * libtiff/tiffiop.h, tif_unix.c, tif_win32.c, tif_vms.c: add _TIFFcalloc() Even Rouault 2017-01-11 19:02:49 +00:00
  • 537cd1da18 Initialize variable to fix MSVC warning (caused by previous commit) Even Rouault 2017-01-11 17:48:11 +00:00
  • a48c640a01 * libtiff/tif_getimage.c: add explicit uint32 cast in putagreytile to avoid UndefinedBehaviorSanitizer warning. Patch by Nicolás Peña. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2658 Even Rouault 2017-01-11 16:38:26 +00:00
  • 50b48786d5 * libtiff/tif_read.c: avoid potential undefined behaviour on signed integer addition in TIFFReadRawStrip1() in isMapped() case. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2650 Even Rouault 2017-01-11 16:33:34 +00:00
  • 153418c943 * libtiff/tif_jpeg.c: validate BitsPerSample in JPEGSetupEncode() to avoid undefined behaviour caused by invalid shift exponent. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2648 Even Rouault 2017-01-11 16:13:50 +00:00
  • d2e6964efc * libtiff/tif_dir.c, tif_dirread.c, tif_dirwrite.c: implement various clampings of double to other data types to avoid undefined behaviour if the output range isn't big enough to hold the input value. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2643 http://bugzilla.maptools.org/show_bug.cgi?id=2642 http://bugzilla.maptools.org/show_bug.cgi?id=2646 http://bugzilla.maptools.org/show_bug.cgi?id=2647 Even Rouault 2017-01-11 16:09:02 +00:00
  • a39f613104 * libtiff/tif_dirread.c: avoid division by floating point 0 in TIFFReadDirEntryCheckedRational() and TIFFReadDirEntryCheckedSrational(), and return 0 in that case (instead of infinity as before presumably) Apparently some sanitizers do not like those divisions by zero. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2644 Even Rouault 2017-01-11 13:28:01 +00:00
  • 9f839d9233 * libtiff/tif_dirwrite.c: in TIFFWriteDirectoryTagCheckedRational, replace assertion by runtime check to error out if passed value is strictly negative. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2535 Even Rouault 2017-01-11 12:51:59 +00:00
  • 20dd00743c * libtiff/tif_jpeg.c: avoid integer division by zero in JPEGSetupEncode() when horizontal or vertical sampling is set to 0. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2653 Even Rouault 2017-01-11 12:15:01 +00:00
  • 553d4c5d05 * libtiff/tif_jpeg.c: increase libjpeg max memory usable to 10 MB instead of libjpeg 1MB default. This helps when creating files with "big" tile, without using libjpeg temporary files. Related to https://trac.osgeo.org/gdal/ticket/6757 Even Rouault 2017-01-03 17:22:49 +00:00
  • 6d97ea6dcc * tools/tiff2pdf.c: avoid potential heap-based overflow in t2p_readwrite_pdf_image_tile(). Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2640 Even Rouault 2016-12-20 17:28:17 +00:00
  • 5e95f6a34c * tools/tiff2pdf.c: avoid potential invalid memory read in t2p_writeproc. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2639 Even Rouault 2016-12-20 17:24:35 +00:00