Date: Friday, July 14, 2017 @ 19:31:52 Author: eworm Revision: 245113
upgpkg: gimp-ufraw 0.22-10 * exiv2 0.26 rebuild * include patches from Debian * fix compilation with GCC 7.1 Added: gimp-ufraw/trunk/001-no-gimp-remote.patch gimp-ufraw/trunk/002-CVE-2015-8366.patch gimp-ufraw/trunk/003-fix-unsigned-char.patch gimp-ufraw/trunk/004-gcc-7.patch Modified: gimp-ufraw/trunk/PKGBUILD -----------------------------+ 001-no-gimp-remote.patch | 12 ++++++++++++ 002-CVE-2015-8366.patch | 17 +++++++++++++++++ 003-fix-unsigned-char.patch | 15 +++++++++++++++ 004-gcc-7.patch | 15 +++++++++++++++ PKGBUILD | 21 ++++++++++++++++++--- 5 files changed, 77 insertions(+), 3 deletions(-) Added: 001-no-gimp-remote.patch =================================================================== --- 001-no-gimp-remote.patch (rev 0) +++ 001-no-gimp-remote.patch 2017-07-14 19:31:52 UTC (rev 245113) @@ -0,0 +1,12 @@ +Don't use gimp-remote since gimp 2.4 already includes gimp-remote functionality +--- a/ufraw_conf.c ++++ b/ufraw_conf.c +@@ -137,7 +137,7 @@ + #elif HAVE_GIMP_2_4 + "gimp", /* remoteGimpCommand */ + #else +- "gimp-remote", /* remoteGimpCommand */ ++ "gimp", /* remoteGimpCommand */ + #endif + + /* EXIF data */ Added: 002-CVE-2015-8366.patch =================================================================== --- 002-CVE-2015-8366.patch (rev 0) +++ 002-CVE-2015-8366.patch 2017-07-14 19:31:52 UTC (rev 245113) @@ -0,0 +1,17 @@ +Fix a buffer overflow bug. See +https://github.com/LibRaw/LibRaw/commit/89d065424f09b788f443734d44857289489ca9e2 + +--- a/dcraw.cc ++++ b/dcraw.cc +@@ -3013,7 +3013,10 @@ + diff = diff ? -diff : 0x80; + if (ftell(ifp) + 12 >= (int) seg[1][1]) + diff = 0; +- raw_image[pix] = pred[pix & 1] += diff; ++ if(pix>=raw_width*raw_height) ++ derror(); ++ else ++ raw_image[pix] = pred[pix & 1] += diff; + if (!(pix & 1) && HOLE(pix / raw_width)) pix += 2; + } + maximum = 0xff; Added: 003-fix-unsigned-char.patch =================================================================== --- 003-fix-unsigned-char.patch (rev 0) +++ 003-fix-unsigned-char.patch 2017-07-14 19:31:52 UTC (rev 245113) @@ -0,0 +1,15 @@ +Description: Fix unsigned char declaration of src[] +Author: John Paul Adrian Glaubitz <[email protected]> +Last-Update: 2017-02-27 + +--- ufraw-0.22.orig/dcraw.cc ++++ ufraw-0.22/dcraw.cc +@@ -2285,7 +2285,7 @@ void CLASS quicktake_100_load_raw() + + void CLASS kodak_radc_load_raw() + { +- static const char src[] = { ++ static const signed char src[] = { + 1,1, 2,3, 3,4, 4,2, 5,7, 6,5, 7,6, 7,8, + 1,0, 2,1, 3,3, 4,4, 5,2, 6,7, 7,6, 8,5, 8,8, + 2,1, 2,3, 3,0, 3,2, 3,4, 4,6, 5,5, 6,7, 6,8, Added: 004-gcc-7.patch =================================================================== --- 004-gcc-7.patch (rev 0) +++ 004-gcc-7.patch 2017-07-14 19:31:52 UTC (rev 245113) @@ -0,0 +1,15 @@ +diff --git a/dcraw.cc b/dcraw.cc +index 88c8068..d78c66b 100644 +--- a/dcraw.cc ++++ b/dcraw.cc +@@ -8766,8 +8766,8 @@ void CLASS identify() + "Nikon", "Nokia", "Olympus", "Pentax", "Phase One", "Ricoh", + "Samsung", "Sigma", "Sinar", "Sony" }; + char head[32], *cp; +- unsigned fsize, i, c; +- int hlen, flen, zero_fsize=1; ++ unsigned fsize; ++ int hlen, flen, zero_fsize=1, i, c; + struct jhead jh; + + tiff_flip = flip = filters = UINT_MAX; /* unknown */ Modified: PKGBUILD =================================================================== --- PKGBUILD 2017-07-14 18:06:06 UTC (rev 245112) +++ PKGBUILD 2017-07-14 19:31:52 UTC (rev 245113) @@ -5,7 +5,7 @@ pkgname=gimp-ufraw pkgver=0.22 -pkgrel=9 +pkgrel=10 pkgdesc='Converter for raw files; utility and GIMP plugin' url='http://ufraw.sourceforge.net/' arch=('x86_64' 'i686') @@ -14,8 +14,16 @@ makedepends=('gimp' 'cinepaint') optdepends=('gimp: to use the gimp import plugin for raw images' 'cinepaint: to use the cinepaint import plugin for raw images') -source=("http://downloads.sourceforge.net/ufraw/ufraw-$pkgver.tar.gz") -sha256sums=('f7abd28ce587db2a74b4c54149bd8a2523a7ddc09bedf4f923246ff0ae09a25e') +source=("http://downloads.sourceforge.net/ufraw/ufraw-$pkgver.tar.gz" + '001-no-gimp-remote.patch' + '002-CVE-2015-8366.patch' + '003-fix-unsigned-char.patch' + '004-gcc-7.patch') +sha256sums=('f7abd28ce587db2a74b4c54149bd8a2523a7ddc09bedf4f923246ff0ae09a25e' + '5a3d33edc738228ea5442cef95d2914cd20fbbae911b1005a5cb0d7931fdeda1' + '3fc1cb962d1023e6c81e2c93353faae8ee395ba31ea121265686918ad51cb219' + 'dbb0dc200867cb67f2ba7688b164e28393ce409092fb759e79b0912dceb3424a' + '5a4be00a7548eb78d7d325646b80ceae2d54fd8bfd46f977586b5e1272af3e4c') prepare() { # One of the include files that comes with cinepaint requires @@ -22,6 +30,13 @@ # ../lib/wire/ to exist... mkdir -p lib ln -s /usr/include/cinepaint/wire lib/wire + + cd "ufraw-$pkgver" + + patch -Np1 < "${srcdir}"/001-no-gimp-remote.patch + patch -Np1 < "${srcdir}"/002-CVE-2015-8366.patch + patch -Np1 < "${srcdir}"/003-fix-unsigned-char.patch + patch -Np1 < "${srcdir}"/004-gcc-7.patch } build() {
