Re: permission to do a vips upload to proposed-updates (bug 714984)
"Adam D. Barratt" <adam@adam-barratt.org.uk> wrote:
> Before giving a final ack, please could you provide a source debdiff of
> the package you're proposing to upload, preferably versioned as 7.28.5-1
> +deb7u1?
Attached. Thanks!
--
Jay Berkenbilt <qjb@debian.org>
diff -Nru vips-7.28.5/debian/changelog vips-7.28.5/debian/changelog
--- vips-7.28.5/debian/changelog 2012-05-29 14:25:06.000000000 -0400
+++ vips-7.28.5/debian/changelog 2013-12-20 16:53:02.000000000 -0500
@@ -1,3 +1,11 @@
+vips (7.28.5-1+deb7u1) stable; urgency=low
+
+ * Fix crash on tiff with jpeg compression. Thanks to Mathieu Malaterre
+ <malat@debian.org> for diagnosing this bug, getting a fix from
+ upstream, and preparing a patch. (Closes: #689523, #714984, #731948)
+
+ -- Jay Berkenbilt <qjb@debian.org> Fri, 20 Dec 2013 16:39:12 -0500
+
vips (7.28.5-1) unstable; urgency=low
* New upstream release
diff -Nru vips-7.28.5/debian/patches/bug714984.patch vips-7.28.5/debian/patches/bug714984.patch
--- vips-7.28.5/debian/patches/bug714984.patch 1969-12-31 19:00:00.000000000 -0500
+++ vips-7.28.5/debian/patches/bug714984.patch 2013-12-20 16:53:02.000000000 -0500
@@ -0,0 +1,103 @@
+Description: Segmentation Fault: vips 7.28.5-1 with jpeg compression
+ commit 996f26ec7011f6eb1aad4c204100d0f0970e2cad
+ Author: John Cupitt <jcupitt@gmail.com>
+ Date: Fri Dec 13 15:03:16 2013 +0000
+
+ fix a tiff write crash
+
+ see
+
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=714984
+ https://github.com/jcupitt/libvips/issues/88
+Bug-Debian: http://bugs.debian.org/714984
+Reviewed-by: Mathieu Malaterre <malat@debian.org>
+
+Index: vips-7.28.5/ChangeLog
+===================================================================
+--- vips-7.28.5.orig/ChangeLog 2012-05-06 13:29:26.000000000 +0200
++++ vips-7.28.5/ChangeLog 2013-12-14 10:47:03.610487401 +0100
+@@ -1,3 +1,6 @@
++13/12/13 started 7.28.5-1
++- fix jpeg tiff write, see https://github.com/jcupitt/libvips/issues/88
++
+ 19/4/12 started 7.28.5
+ - ifthenelse blend mode was broken
+ - small blend speedup
+Index: vips-7.28.5/libvips/foreign/vips2tiff.c
+===================================================================
+--- vips-7.28.5.orig/libvips/foreign/vips2tiff.c 2012-05-06 13:29:26.000000000 +0200
++++ vips-7.28.5/libvips/foreign/vips2tiff.c 2013-12-14 10:47:03.610487401 +0100
+@@ -126,6 +126,8 @@
+ * 2/12/11
+ * - make into a simple function call ready to be wrapped as a new-style
+ * VipsForeign class
++ * 7/8/12
++ * - be more cautious enabling YCbCr mode
+ */
+
+ /*
+@@ -452,15 +454,9 @@
+ TIFFSetField( tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT );
+ TIFFSetField( tif, TIFFTAG_COMPRESSION, tw->compression );
+
+- if( tw->compression == COMPRESSION_JPEG ) {
++ if( tw->compression == COMPRESSION_JPEG )
+ TIFFSetField( tif, TIFFTAG_JPEGQUALITY, tw->jpqual );
+
+- /* Enable rgb->ycbcr conversion in the jpeg write. See also
+- * the photometric selection below.
+- */
+- TIFFSetField( tif, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB );
+- }
+-
+ if( tw->predictor != -1 )
+ TIFFSetField( tif, TIFFTAG_PREDICTOR, tw->predictor );
+
+@@ -518,12 +514,17 @@
+ TIFFTAG_INKSET, INKSET_CMYK );
+ }
+ else if( tw->compression == COMPRESSION_JPEG &&
+- tw->im->Bands == 3 )
++ tw->im->Bands == 3 &&
++ tw->im->BandFmt == VIPS_FORMAT_UCHAR ) {
+ /* This signals to libjpeg that it can do
+ * YCbCr chrominance subsampling from RGB, not
+ * that we will supply the image as YCbCr.
+ */
+ photometric = PHOTOMETRIC_YCBCR;
++ TIFFSetField( tif,
++ TIFFTAG_JPEGCOLORMODE,
++ JPEGCOLORMODE_RGB );
++ }
+ else
+ photometric = PHOTOMETRIC_RGB;
+
+@@ -1340,9 +1341,27 @@
+ /* TIFFTAG_JPEGQUALITY is a pesudo-tag, so we can't copy it.
+ * Set explicitly from TiffWrite.
+ */
+- if( tw->compression == COMPRESSION_JPEG )
++ if( tw->compression == COMPRESSION_JPEG ) {
+ TIFFSetField( out, TIFFTAG_JPEGQUALITY, tw->jpqual );
+
++ /* Only for three-band, 8-bit images.
++ */
++ if( tw->im->Bands == 3 &&
++ tw->im->BandFmt == VIPS_FORMAT_UCHAR ) {
++ /* Enable rgb->ycbcr conversion in the jpeg write.
++ */
++ TIFFSetField( out,
++ TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB );
++
++ /* And we want ycbcr expanded to rgb on read.
++ * Otherwise TIFFTileSize() will give us the size of
++ * a chrominance subsampled tile.
++ */
++ TIFFSetField( in,
++ TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB );
++ }
++ }
++
+ /* We can't copy profiles :( Set again from TiffWrite.
+ */
+ if( embed_profile( tw, out ) )
diff -Nru vips-7.28.5/debian/patches/series vips-7.28.5/debian/patches/series
--- vips-7.28.5/debian/patches/series 2010-02-06 17:41:01.000000000 -0500
+++ vips-7.28.5/debian/patches/series 2013-12-20 16:53:02.000000000 -0500
@@ -0,0 +1 @@
+bug714984.patch
Reply to: