0001-TIFFReadRGBAImage-prevent-integer-overflow-and-later.patch has been fixed upstream Downloaded from https://download.osgeo.org/libtiff/tiff-4.7.2.tar.xz Change-Id: I4478bb99ad7935815649054868ecf90b306dc1b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207612 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
21 lines
777 B
Diff
21 lines
777 B
Diff
--- a/libtiff/tif_strip.c
|
|
+++ b/libtiff/tif_strip.c
|
|
@@ -159,10 +159,13 @@
|
|
_TIFFMultiply64(tif, samplingrow_size, samplingblocks_ver, module));
|
|
}
|
|
else
|
|
- return (_TIFFMultiply64(tif, nrows,
|
|
- isStrip ? TIFFScanlineSize64(tif)
|
|
- : TIFFTileRowSize64(tif),
|
|
- module));
|
|
+ {
|
|
+ uint64_t row_size = isStrip ? TIFFScanlineSize64(tif) : TIFFTileRowSize64(tif);
|
|
+ /* I think the way this works the expectation is there are always even num of samples */
|
|
+ if (td->td_photometric == PHOTOMETRIC_YCBCR)
|
|
+ row_size = TIFFroundup_64(row_size, 2);
|
|
+ return (_TIFFMultiply64(tif, nrows, row_size, module));
|
|
+ }
|
|
}
|
|
|
|
/*
|