pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/graphics/tiff

Module Name:    pkgsrc
Committed By:   he
Date:           Mon May 29 13:44:05 UTC 2017

Modified Files:
        pkgsrc/graphics/tiff: Makefile PLIST distinfo
Removed Files:
            patch-libtiff_tif__luv.c patch-libtiff_tif__pixarlog.c
            patch-libtiff_tif__strip.c patch-libtiff_tif_dir.c
            patch-libtiff_tif_dirread.c patch-libtiff_tif_dirwrite.c
            patch-libtiff_tif_getimage.c patch-libtiff_tif_jpeg.c
            patch-libtiff_tif_ojpeg.c patch-libtiff_tif_read.c
            patch-libtiff_tif_unix.c patch-libtiff_tif_win32.c
            patch-libtiff_tiffio.h patch-libtiff_tiffiop.h
   patch-tools_tiff2pdf.c patch-tools_tiffcp.c

Log Message:
Update tiff to version 4.0.8.

Pkgsrc changes:
 * Adapt PLIST, remove patches for now-integrated bugfixes.

As the release announcement says:

   All of the changes are bug and security fixes.

Upstream changes:

 * libtiff/tif_getimage.c, libtiff/tif_open.c: add parenthesis to
   fix cppcheck clarifyCalculation warnings * libtiff/tif_predict.c,
   libtiff/tif_print.c: fix printf unsigned vs signed formatting
   (cppcheck invalidPrintfArgType_uint warnings)
 * libtiff/tif_read.c, libtiff/tiffiop.h: fix uint32 overflow in
   TIFFReadEncodedStrip() that caused an integer division by zero.
   Reported by Agostino Sarubbo. Fixes
 * libtiff/tif_pixarlog.c, libtiff/tif_luv.c: fix heap-based buffer
   overflow on generation of PixarLog / LUV compressed files, with
   ColorMap, TransferFunction attached and nasty plays with
   bitspersample. The fix for LUV has not been tested, but suffers
   from the same kind of issue of PixarLog. Reported by Agostino
   Sarubbo. Fixes
 * libtiff/tif_strip.c: revert the change in TIFFNumberOfStrips()
   done for /
   CVE-2016-9273 since the above change is a better fix that makes
   it unnecessary.
 * libtiff/tif_dirread.c: modify ChopUpSingleUncompressedStrip()
   to instanciate compute ntrips as TIFFhowmany_32(td->td_imagelength,
   rowsperstrip), instead of a logic based on the total size of
   data. Which is faulty is the total size of data is not sufficient
   to fill the whole image, and thus results in reading outside of
   the StripByCounts/StripOffsets arrays when using TIFFReadScanline().
   Reported by Agostino Sarubbo. Fixes
 * libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of
   failure in OJPEGPreDecode(). This will avoid a divide by zero,
   and potential other issues. Reported by Agostino Sarubbo. Fixes
 * libtiff/tif_write.c: fix misleading indentation as warned by GCC.
 * libtiff/tif_fax3.h: revert change done on 2016-01-09 that made
   Param member of TIFFFaxTabEnt structure a uint16 to reduce size
   of the binary. It happens that the Hylafax software uses the
   tables that follow this typedef (TIFFFaxMainTable, TIFFFaxWhiteTable,
   TIFFFaxBlackTable), although they are not in a public libtiff
   header. Raised by Lee Howard. Fixes
 * libtiff/tiffio.h, libtiff/tif_getimage.c: add TIFFReadRGBAStripExt()
   and TIFFReadRGBATileExt() variants of the functions without ext,
   with an extra argument to control the stop_on_error behaviour.
 * libtiff/tif_getimage.c: fix potential memory leaks in error code
   path of TIFFRGBAImageBegin(). Fixes
 * 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
 * libtiff/tif_jpeg.c: avoid integer division by zero in
   JPEGSetupEncode() when horizontal or vertical sampling is set
   to 0. Fixes
 * libtiff/tif_dirwrite.c: in TIFFWriteDirectoryTagCheckedRational,
   replace assertion by runtime check to error out if passed value
   is strictly negative. Fixes
 * 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
 * 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
 * libtiff/tif_jpeg.c: validate BitsPerSample in JPEGSetupEncode()
   to avoid undefined behaviour caused by invalid shift exponent.
 * libtiff/tif_read.c: avoid potential undefined behaviour on signed
   integer addition in TIFFReadRawStrip1() in isMapped() case.
 * libtiff/tif_getimage.c: add explicit uint32 cast in putagreytile
   to avoid UndefinedBehaviorSanitizer warning. Patch by Nicolás
   Peña. Fixes
 * libtiff/tif_read.c: TIFFReadBufferSetup(): use _TIFFcalloc() to
   zero initialize tif_rawdata. Fixes
 * libtiff/tiffio.h, tif_unix.c, tif_win32.c, tif_vms.c: add _TIFFcalloc()
 * libtiff/tif_luv.c, tif_lzw.c, tif_packbits.c: return 0 in Encode
   functions instead of -1 when TIFFFlushData1() fails. Fixes
 * libtiff/tif_ojpeg.c: fix leak in OJPEGReadHeaderInfoSecTablesQTable,
   OJPEGReadHeaderInfoSecTablesDcTable and
   OJPEGReadHeaderInfoSecTablesAcTable when read fails. Patch by
   Nicolás Peña. Fixes
 * 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 the tag is present (especially
   on cloud hosted files).
 * 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
 * libtiff/tif_pixarlog.c: fix memory leak in error code path of
   PixarLogSetupDecode(). Patch by Nicolás Peña. Fixes
 * libtiff/tif_fax3.c, tif_predict.c, tif_getimage.c: fix GCC 7
   -Wimplicit-fallthrough warnings.
 * 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
 * libtiff/tif_ojpeg.c: fix potential memory leak in
   OJPEGReadHeaderInfoSecTablesQTable, OJPEGReadHeaderInfoSecTablesDcTable
   and OJPEGReadHeaderInfoSecTablesAcTable Patch by Nicolás Peña.
 * libtiff/tif_fax3.c: avoid crash in Fax3Close() on empty file.
   Patch by Alan Coopersmith + complement by myself. Fixes
 * 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.
 * 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)
 * 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)
 * 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.
 * 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)
 * 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
   Credit to OSS-Fuzz
 * libtiff/tif_color.c: avoid potential int32 overflow in
   TIFFYCbCrToRGBInit() Fixes Credit
   to OSS-Fuzz
 * libtiff/tif_pixarlog.c, tif_luv.c: avoid potential int32 overflows
   in multiply_ms() and add_ms(). Fixes Credit
   to OSS-Fuzz
 * libtiff/tif_packbits.c: fix out-of-buffer read in PackBitsDecode()
   Credit to OSS-Fuzz
 * libtiff/tif_luv.c: LogL16InitState(): avoid excessive memory
   allocation when RowsPerStrip tag is missing. Credit to OSS-Fuzz
   (locally run, on GDAL)
 * 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
 * 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...
 * 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 Credit
   to OSS Fuzz
 * libtiff/tif_read.c: _TIFFVSetField(): fix outside range cast of
   double to float. Credit to Google Autofuzz project
 * libtiff/tif_getimage.c: initYCbCrConversion(): check luma[1] is
   not zero to avoid division by zero. Fixes Credit
   to OSS Fuzz
 * libtiff/tif_read.c: _TIFFVSetField(): fix outside range cast of
   double to float. Credit to Google Autofuzz project
 * libtiff/tif_getimage.c: initYCbCrConversion(): check luma[1] is
   not zero to avoid division by zero. Fixes Credit
   to OSS Fuzz
 * libtiff/tif_getimage.c: initYCbCrConversion(): stricter validation
   for refBlackWhite coefficients values. To avoid invalid float->int32
   conversion. Fixes Credit
   to OSS Fuzz

 * tools/fax2tiff.c (main): Applied patch by Jörg Ahrens to fix
   passing client data for Win32 builds using tif_win32.c
   (USE_WIN32_FILEIO defined) for file I/O. Patch was provided via
   email on November 20, 2016.
 * tools/tiffcp.c: avoid uint32 underflow in cpDecodedStrips that
   can cause various issues, such as buffer overflows in the library.
   Reported by Agostino Sarubbo. Fixes
 * tools/tiffcrop.c: fix readContigStripsIntoBuffer() in -i (ignore)
   mode so that the output buffer is correctly incremented to avoid
   write outside bounds. Reported by Agostino Sarubbo. Fixes
 * tools/tiffcrop.c: add 3 extra bytes at end of strip buffer in
   readSeparateStripsIntoBuffer() to avoid read outside of heap
   allocated buffer. Reported by Agostino Sarubbo. Fixes
 * tools/tiffcrop.c: fix integer division by zero when BitsPerSample
   is missing. Reported by Agostino Sarubbo. Fixes
 * tools/tiffinfo.c: fix null pointer dereference in -r mode when
   the image has no StripByteCount tag. Reported by Agostino Sarubbo.
 * tools/tiffcp.c: avoid potential division by zero is BitsPerSamples
   tag is missing. Reported by Agostino Sarubbo. Fixes
 * tools/tif_dir.c: when TIFFGetField(, TIFFTAG_NUMBEROFINKS, ) is
   called, limit the return number of inks to SamplesPerPixel, so
   that code that parses ink names doesn't go past the end of the
   buffer. Reported by Agostino Sarubbo. Fixes
 * tools/tiffcp.c: avoid potential division by zero is BitsPerSamples
   tag is missing. Reported by Agostino Sarubbo. Fixes
 * tools/tiffcp.c: fix uint32 underflow/overflow that can cause
   heap-based buffer overflow. Reported by Agostino Sarubbo. Fixes
 * tools/tiffcp.c: replace assert( (bps % 8) == 0 ) by a non assert
   check. Reported by Agostino Sarubbo. Fixes
 * tools/tiff2ps.c: fix 2 heap-based buffer overflows (in PSDataBW
   and PSDataColorContig). Reported by Agostino Sarubbo. Fixes and
 * tools/tiff2pdf.c: prevent heap-based buffer overflow in -j mode
   on a paletted image. Note: this fix errors out before the overflow
   happens. There could probably be a better fix. Fixes
 * tools/tiff2pdf.c: fix wrong usage of memcpy() that can trigger
   unspecified behaviour. Fixes
 * tools/tiff2pdf.c: avoid potential invalid memory read in
   t2p_writeproc. Fixes
 * tools/tiff2pdf.c: avoid potential heap-based overflow in
   t2p_readwrite_pdf_image_tile(). Fixes
 * tools/tiffcrop.c: remove extraneous TIFFClose() in error code
   path, that caused double free. Related to
 * tools/tiffcp.c: error out cleanly in cpContig2SeparateByRow and
   cpSeparate2ContigByRow if BitsPerSample != 8 to avoid heap based
   overflow. Fixes
 * tools/raw2tiff.c: avoid integer division by zero. Fixes
 * tools/tiff2ps.c: call TIFFClose() in error code paths.
 * tools/fax2tiff.c: emit appropriate message if the input file is
   empty. Patch by Alan Coopersmith. Fixes
 * tools/tiff2bw.c: close TIFF handle in error code path. Fixes

To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 pkgsrc/graphics/tiff/Makefile
cvs rdiff -u -r1.23 -r1.24 pkgsrc/graphics/tiff/PLIST
cvs rdiff -u -r1.81 -r1.82 pkgsrc/graphics/tiff/distinfo
cvs rdiff -u -r1.1 -r0 \
    pkgsrc/graphics/tiff/patches/ \
    pkgsrc/graphics/tiff/patches/patch-libtiff_tif__luv.c \
    pkgsrc/graphics/tiff/patches/patch-libtiff_tif__pixarlog.c \
    pkgsrc/graphics/tiff/patches/patch-libtiff_tif__strip.c \
    pkgsrc/graphics/tiff/patches/patch-libtiff_tif_dir.c \
    pkgsrc/graphics/tiff/patches/patch-libtiff_tif_dirwrite.c \
    pkgsrc/graphics/tiff/patches/patch-libtiff_tif_getimage.c \
    pkgsrc/graphics/tiff/patches/patch-libtiff_tif_jpeg.c \
    pkgsrc/graphics/tiff/patches/patch-libtiff_tif_unix.c \
    pkgsrc/graphics/tiff/patches/patch-libtiff_tif_win32.c \
    pkgsrc/graphics/tiff/patches/patch-libtiff_tiffio.h \
cvs rdiff -u -r1.3 -r0 \
    pkgsrc/graphics/tiff/patches/patch-libtiff_tif_dirread.c \
    pkgsrc/graphics/tiff/patches/patch-libtiff_tiffiop.h \
    pkgsrc/graphics/tiff/patches/patch-tools_tiff2pdf.c \
cvs rdiff -u -r1.2 -r0 pkgsrc/graphics/tiff/patches/patch-libtiff_tif_ojpeg.c \
    pkgsrc/graphics/tiff/patches/patch-libtiff_tif_read.c \

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/graphics/tiff/Makefile
diff -u pkgsrc/graphics/tiff/Makefile:1.135 pkgsrc/graphics/tiff/Makefile:1.136
--- pkgsrc/graphics/tiff/Makefile:1.135 Sun May  7 21:52:16 2017
+++ pkgsrc/graphics/tiff/Makefile       Mon May 29 13:44:05 2017
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.135 2017/05/07 21:52:16 he Exp $
+# $NetBSD: Makefile,v 1.136 2017/05/29 13:44:05 he Exp $
-DISTNAME=      tiff-4.0.7
+DISTNAME=      tiff-4.0.8
 CATEGORIES=    graphics

Index: pkgsrc/graphics/tiff/PLIST
diff -u pkgsrc/graphics/tiff/PLIST:1.23 pkgsrc/graphics/tiff/PLIST:1.24
--- pkgsrc/graphics/tiff/PLIST:1.23     Wed Nov 23 13:51:29 2016
+++ pkgsrc/graphics/tiff/PLIST  Mon May 29 13:44:05 2017
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.23 2016/11/23 13:51:29 he Exp $
+@comment $NetBSD: PLIST,v 1.24 2017/05/29 13:44:05 he Exp $
@@ -232,4 +232,5 @@ share/doc/tiff/html/v4.0.4.html

Index: pkgsrc/graphics/tiff/distinfo
diff -u pkgsrc/graphics/tiff/distinfo:1.81 pkgsrc/graphics/tiff/distinfo:1.82
--- pkgsrc/graphics/tiff/distinfo:1.81  Sun May  7 21:52:16 2017
+++ pkgsrc/graphics/tiff/distinfo       Mon May 29 13:44:05 2017
@@ -1,26 +1,7 @@
-$NetBSD: distinfo,v 1.81 2017/05/07 21:52:16 he Exp $
+$NetBSD: distinfo,v 1.82 2017/05/29 13:44:05 he Exp $
-SHA1 (tiff-4.0.7.tar.gz) = 2c1b64478e88f93522a42dd5271214a0e5eae648
-RMD160 (tiff-4.0.7.tar.gz) = 582e19c31e7f29d9ed36995dcad7ad68802cbadb
-SHA512 (tiff-4.0.7.tar.gz) = 941357bdd5f947cdca41a1d31ae14b3fadc174ae5dce7b7981dbe58f61995f575ac2e97a7cc4fcc435184012017bec0920278263490464644f2cdfad9a6c5ddc
-Size (tiff-4.0.7.tar.gz) = 2076392 bytes
+SHA1 (tiff-4.0.8.tar.gz) = 88717c97480a7976c94d23b6d9ed4ac74715267f
+RMD160 (tiff-4.0.8.tar.gz) = 0d8bc26c98035810c73b8f876f76dc48efba7da8
+SHA512 (tiff-4.0.8.tar.gz) = 5d010ec4ce37aca733f7ab7db9f432987b0cd21664bd9d99452a146833c40f0d1e7309d1870b0395e947964134d5cfeb1366181e761fe353ad585803ff3d6be6
+Size (tiff-4.0.8.tar.gz) = 2065574 bytes
 SHA1 (patch-configure) = a0032133f06b6ac92bbf52349fabe83f74ea14a6
-SHA1 ( = 705604e2a3065da192e7354a4a9cdcd16bd6823d
-SHA1 (patch-libtiff_tif__luv.c) = c2e8ce7474119ffa02d226932ad6c8c2b230062c
-SHA1 (patch-libtiff_tif__pixarlog.c) = ad16681cf3fcb5fded048eb70c0a93f1b6447147
-SHA1 (patch-libtiff_tif__strip.c) = f7dc7b24378d0541a8f3bcc3cad78ea2d6ae14d7
-SHA1 (patch-libtiff_tif_dir.c) = 28c45b95cedeebe005b44b45393d66f61e0ea6f7
-SHA1 (patch-libtiff_tif_dirread.c) = f6d442da817457d7ac801a3005e21c357ac31f8a
-SHA1 (patch-libtiff_tif_dirwrite.c) = 07ccbf8cf210b95d5ca7710cc2982368783b4dcb
-SHA1 (patch-libtiff_tif_getimage.c) = 267b555c8b043d0a835db4d46ef65131776601e6
-SHA1 (patch-libtiff_tif_jpeg.c) = 1049b7b243e9e145886bcac8e68e5e7889337ebc
-SHA1 (patch-libtiff_tif_ojpeg.c) = 1c43555434525157c1783de4802af4508c5113a4
-SHA1 (patch-libtiff_tif_read.c) = d43b10fa74a51da21f44abb7bd0251b88e8a702b
-SHA1 (patch-libtiff_tif_unix.c) = c8312771e567f90de0f77ac8eb66ed5c36e35617
-SHA1 (patch-libtiff_tif_win32.c) = 1ea9dcb6618c40b9de3e8d2a81914355f2111fdc
-SHA1 (patch-libtiff_tiffio.h) = e0efa9e1246e07dbb3a69d626988a18f12ba9d3c
-SHA1 (patch-libtiff_tiffiop.h) = 1100e55483da58037fa3f4168fffdfcbc5407456
-SHA1 ( = ff073529c9d3ab98a03efa7d98c3263c1782482f
-SHA1 (patch-tools_tiff2pdf.c) = ce7a3e77c27ad3cabaa33b5da61cbd1b27f187d1
-SHA1 (patch-tools_tiffcp.c) = bd6abd9dc6e044ff04d761d999fabfb0919ba0db
-SHA1 (patch-tools_tiffcrop.c) = 1d729028fb8c05de958424234d5cc2808acc9b25

Home | Main Index | Thread Index | Old Index