[arch-commits] Commit in gd/repos (10 files)
Pierre Schmitz
pierre at archlinux.org
Fri May 6 08:38:36 UTC 2016
Date: Friday, May 6, 2016 @ 10:38:35
Author: pierre
Revision: 267012
archrelease: copy trunk to extra-i686, extra-x86_64
Added:
gd/repos/extra-i686/CVE-2016-3074.patch
(from rev 267011, gd/trunk/CVE-2016-3074.patch)
gd/repos/extra-i686/PKGBUILD
(from rev 267011, gd/trunk/PKGBUILD)
gd/repos/extra-i686/gd-2.1.1-libvpx-1.4.0.patch
(from rev 267011, gd/trunk/gd-2.1.1-libvpx-1.4.0.patch)
gd/repos/extra-x86_64/CVE-2016-3074.patch
(from rev 267011, gd/trunk/CVE-2016-3074.patch)
gd/repos/extra-x86_64/PKGBUILD
(from rev 267011, gd/trunk/PKGBUILD)
gd/repos/extra-x86_64/gd-2.1.1-libvpx-1.4.0.patch
(from rev 267011, gd/trunk/gd-2.1.1-libvpx-1.4.0.patch)
Deleted:
gd/repos/extra-i686/PKGBUILD
gd/repos/extra-i686/gd-2.1.1-libvpx-1.4.0.patch
gd/repos/extra-x86_64/PKGBUILD
gd/repos/extra-x86_64/gd-2.1.1-libvpx-1.4.0.patch
------------------------------------------+
/PKGBUILD | 90 +++++++++++++++++++++++++
/gd-2.1.1-libvpx-1.4.0.patch | 74 ++++++++++++++++++++
extra-i686/CVE-2016-3074.patch | 104 +++++++++++++++++++++++++++++
extra-i686/PKGBUILD | 43 -----------
extra-i686/gd-2.1.1-libvpx-1.4.0.patch | 37 ----------
extra-x86_64/CVE-2016-3074.patch | 104 +++++++++++++++++++++++++++++
extra-x86_64/PKGBUILD | 43 -----------
extra-x86_64/gd-2.1.1-libvpx-1.4.0.patch | 37 ----------
8 files changed, 372 insertions(+), 160 deletions(-)
Copied: gd/repos/extra-i686/CVE-2016-3074.patch (from rev 267011, gd/trunk/CVE-2016-3074.patch)
===================================================================
--- extra-i686/CVE-2016-3074.patch (rev 0)
+++ extra-i686/CVE-2016-3074.patch 2016-05-06 08:38:35 UTC (rev 267012)
@@ -0,0 +1,105 @@
+From 2bb97f407c1145c850416a3bfbcc8cf124e68a19 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier at gentoo.org>
+Date: Sat, 16 Apr 2016 03:51:22 -0400
+Subject: gd2: handle corrupt images better (CVE-2016-3074)
+
+Make sure we do some range checking on corrupted chunks.
+
+Thanks to Hans Jerry Illikainen <hji at dyntopia.com> for indepth report
+and reproducer information. Made for easy test case writing :).
+---
+ .gitignore | 1 +
+ src/gd_gd2.c | 2 ++
+ tests/Makefile.am | 3 ++-
+ tests/gd2/gd2_read_corrupt.c | 25 +++++++++++++++++++++++++
+ tests/gd2/invalid_neg_size.gd2 | Bin 0 -> 1676 bytes
+ 5 files changed, 30 insertions(+), 1 deletion(-)
+ create mode 100644 tests/gd2/gd2_read_corrupt.c
+ create mode 100644 tests/gd2/invalid_neg_size.gd2
+
+diff --git a/.gitignore b/.gitignore
+index a68f3b9..35acd71 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -150,6 +150,7 @@ Makefile.in
+ /tests/gd2/gd2_im2im
+ /tests/gd2/gd2_null
+ /tests/gd2/gd2_read
++/tests/gd2/gd2_read_corrupt
+ /tests/gdimagearc/bug00079
+ /tests/gdimageline/gdimageline_aa
+ /tests/gdimageline/bug00072
+diff --git a/src/gd_gd2.c b/src/gd_gd2.c
+index 6f28461..a50b33d 100644
+--- a/src/gd_gd2.c
++++ b/src/gd_gd2.c
+@@ -165,6 +165,8 @@ _gd2GetHeader (gdIOCtxPtr in, int *sx, int *sy,
+ if (gdGetInt (&cidx[i].size, in) != 1) {
+ goto fail2;
+ };
++ if (cidx[i].offset < 0 || cidx[i].size < 0)
++ goto fail2;
+ };
+ *chunkIdx = cidx;
+ };
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index ed2c35b..b582266 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -129,7 +129,8 @@ endif
+
+ if HAVE_LIBZ
+ check_PROGRAMS += \
+- gd2/gd2_null
++ gd2/gd2_null \
++ gd2/gd2_read_corrupt
+ endif
+
+ if HAVE_LIBPNG
+diff --git a/tests/gd2/gd2_read_corrupt.c b/tests/gd2/gd2_read_corrupt.c
+new file mode 100644
+index 0000000..11f6a67
+--- /dev/null
++++ b/tests/gd2/gd2_read_corrupt.c
+@@ -0,0 +1,25 @@
++/* Just try to read the invalid gd2 image & not crash. */
++#include "gd.h"
++#include <stdio.h>
++#include <stdlib.h>
++#include "gdtest.h"
++
++int main()
++{
++ gdImagePtr im;
++ FILE *fp;
++ char path[1024];
++
++ /* Read the corrupt image. */
++ sprintf(path, "%s/gd2/invalid_neg_size.gd2", GDTEST_TOP_DIR);
++ fp = fopen(path, "rb");
++ if (!fp) {
++ printf("failed, cannot open file\n");
++ return 1;
++ }
++ im = gdImageCreateFromGd2(fp);
++ fclose(fp);
++
++ /* Should have failed & rejected it. */
++ return im == NULL ? 0 : 1;
++}
+diff --git a/tests/gd2/invalid_neg_size.gd2 b/tests/gd2/invalid_neg_size.gd2
+new file mode 100644
+index 0000000..3075f15
+--- /dev/null
++++ b/tests/gd2/invalid_neg_size.gd2
+@@ -0,0 +1,5 @@
++gd2 @ ) o ÿÿÿÿ
xd ÿAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAéeß²lP¬ñtoWØ;`å`è8jTH×Ôöð#&? åÏYøë$ÄT/ê göBf<7k°¾Ô<Pù¹âçùÖyÛÀðì¤Ã)`9Èê°Ö
++ÔBE3?sÑì¾´yhcÜã7K+`rq´¡Òä×ëWEEþbÉ2SJ÷MXnx´ÔâÕàHªµV¤QpY×ñô^ÒlNl©·j³â
cF
++Yãµ^o;rÆÏ5xò%Ñ<1Ýv¿µ|?±$¯]Ö¢Õ÷â÷ªñ¨R¤]èÓÑͦ}Ñ¥Ö9$«,wÊ[jAóò[Ü=©ýÎëÁ3Û«>.~!ƧXæûãåYº& [T7SöI& ü7`M1lOÄTa$Í®é
++²aeÊïÊ
¾Á~¦Æ}ûi¾}[)N÷Ëæ+%s75'=_ïһȽyMD1`»t÷òî·ØÆÈ
++p~,`:?©aÏVÖ?ñ*èèP×ÃIYbßËÏ°<§S$Vÿ6P¾¼á7Ü{9¡6Ñ1¹=áDæC 1}X~P¬þÛö»IvÍÇ3ðßoGK
+xØ1*xÍ Ø
+\ No newline at end of file
+--
+2.8.2
+
Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD 2016-05-06 08:34:45 UTC (rev 267011)
+++ extra-i686/PKGBUILD 2016-05-06 08:38:35 UTC (rev 267012)
@@ -1,43 +0,0 @@
-# $Id$
-
-pkgname=gd
-pkgver=2.1.1
-pkgrel=3
-pkgdesc="Library for the dynamic creation of images by programmers"
-arch=('i686' 'x86_64')
-url="http://www.libgd.org/"
-license=('custom')
-depends=('fontconfig' 'libvpx' 'libxpm' 'libtiff')
-makedepends=('git')
-optdepends=('perl: bdftogd script')
-source=("${pkgname}::git+https://github.com/libgd/libgd.git#tag=${pkgname}-${pkgver}"
- gd-2.1.1-libvpx-1.4.0.patch)
-md5sums=('SKIP'
- '9114dd8259aaa88b0a09188fe7b19afc')
-
-prepare() {
- cd ${pkgname}
- ./bootstrap.sh
- patch -p1 -i "${srcdir}/gd-2.1.1-libvpx-1.4.0.patch"
-}
-
-build() {
- cd ${pkgname}
- ./configure \
- --prefix=/usr \
- --disable-rpath \
- --with-vpx=/usr \
- --with-tiff=/usr
- make
-}
-
-check() {
- cd ${pkgname}
- make check
-}
-
-package() {
- cd ${pkgname}
- make DESTDIR="${pkgdir}" install
- install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-}
Copied: gd/repos/extra-i686/PKGBUILD (from rev 267011, gd/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD (rev 0)
+++ extra-i686/PKGBUILD 2016-05-06 08:38:35 UTC (rev 267012)
@@ -0,0 +1,45 @@
+# $Id$
+
+pkgname=gd
+pkgver=2.1.1
+pkgrel=4
+pkgdesc="Library for the dynamic creation of images by programmers"
+arch=('i686' 'x86_64')
+url="http://www.libgd.org/"
+license=('custom')
+depends=('fontconfig' 'libvpx' 'libxpm' 'libtiff')
+makedepends=('git')
+optdepends=('perl: bdftogd script')
+source=("${pkgname}::git+https://github.com/libgd/libgd.git#tag=${pkgname}-${pkgver}"
+ 'gd-2.1.1-libvpx-1.4.0.patch' 'CVE-2016-3074.patch')
+md5sums=('SKIP'
+ '9114dd8259aaa88b0a09188fe7b19afc'
+ '60d9ef94a60d9a77232b79da4b80626e')
+
+prepare() {
+ cd ${pkgname}
+ ./bootstrap.sh
+ patch -p1 -i "${srcdir}/gd-2.1.1-libvpx-1.4.0.patch"
+ patch -p1 -i "${srcdir}/CVE-2016-3074.patch"
+}
+
+build() {
+ cd ${pkgname}
+ ./configure \
+ --prefix=/usr \
+ --disable-rpath \
+ --with-vpx=/usr \
+ --with-tiff=/usr
+ make
+}
+
+check() {
+ cd ${pkgname}
+ make check
+}
+
+package() {
+ cd ${pkgname}
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
Deleted: extra-i686/gd-2.1.1-libvpx-1.4.0.patch
===================================================================
--- extra-i686/gd-2.1.1-libvpx-1.4.0.patch 2016-05-06 08:34:45 UTC (rev 267011)
+++ extra-i686/gd-2.1.1-libvpx-1.4.0.patch 2016-05-06 08:38:35 UTC (rev 267012)
@@ -1,37 +0,0 @@
-From d41eb72cd4545c394578332e5c102dee69e02ee8 Mon Sep 17 00:00:00 2001
-From: Remi Collet <fedora at famillecollet.com>
-Date: Tue, 7 Apr 2015 13:11:03 +0200
-Subject: [PATCH] Fix build with latest libvpx 1.4.0
-
-These new constants exist at least since 1.0.0
-Compatibility ones have been droped in 1.4.0
----
- src/webpimg.c | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/src/webpimg.c b/src/webpimg.c
-index cf73d64..e49fcc6 100644
---- a/src/webpimg.c
-+++ b/src/webpimg.c
-@@ -711,14 +711,14 @@ static WebPResult VPXEncode(const uint8* Y,
- codec_ctl(&enc, VP8E_SET_STATIC_THRESHOLD, 0);
- codec_ctl(&enc, VP8E_SET_TOKEN_PARTITIONS, 2);
-
-- vpx_img_wrap(&img, IMG_FMT_I420,
-+ vpx_img_wrap(&img, VPX_IMG_FMT_I420,
- y_width, y_height, 16, (uint8*)(Y));
-- img.planes[PLANE_Y] = (uint8*)(Y);
-- img.planes[PLANE_U] = (uint8*)(U);
-- img.planes[PLANE_V] = (uint8*)(V);
-- img.stride[PLANE_Y] = y_stride;
-- img.stride[PLANE_U] = uv_stride;
-- img.stride[PLANE_V] = uv_stride;
-+ img.planes[VPX_PLANE_Y] = (uint8*)(Y);
-+ img.planes[VPX_PLANE_U] = (uint8*)(U);
-+ img.planes[VPX_PLANE_V] = (uint8*)(V);
-+ img.stride[VPX_PLANE_Y] = y_stride;
-+ img.stride[VPX_PLANE_U] = uv_stride;
-+ img.stride[VPX_PLANE_V] = uv_stride;
-
- res = vpx_codec_encode(&enc, &img, 0, 1, 0, VPX_DL_BEST_QUALITY);
-
Copied: gd/repos/extra-i686/gd-2.1.1-libvpx-1.4.0.patch (from rev 267011, gd/trunk/gd-2.1.1-libvpx-1.4.0.patch)
===================================================================
--- extra-i686/gd-2.1.1-libvpx-1.4.0.patch (rev 0)
+++ extra-i686/gd-2.1.1-libvpx-1.4.0.patch 2016-05-06 08:38:35 UTC (rev 267012)
@@ -0,0 +1,37 @@
+From d41eb72cd4545c394578332e5c102dee69e02ee8 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora at famillecollet.com>
+Date: Tue, 7 Apr 2015 13:11:03 +0200
+Subject: [PATCH] Fix build with latest libvpx 1.4.0
+
+These new constants exist at least since 1.0.0
+Compatibility ones have been droped in 1.4.0
+---
+ src/webpimg.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/webpimg.c b/src/webpimg.c
+index cf73d64..e49fcc6 100644
+--- a/src/webpimg.c
++++ b/src/webpimg.c
+@@ -711,14 +711,14 @@ static WebPResult VPXEncode(const uint8* Y,
+ codec_ctl(&enc, VP8E_SET_STATIC_THRESHOLD, 0);
+ codec_ctl(&enc, VP8E_SET_TOKEN_PARTITIONS, 2);
+
+- vpx_img_wrap(&img, IMG_FMT_I420,
++ vpx_img_wrap(&img, VPX_IMG_FMT_I420,
+ y_width, y_height, 16, (uint8*)(Y));
+- img.planes[PLANE_Y] = (uint8*)(Y);
+- img.planes[PLANE_U] = (uint8*)(U);
+- img.planes[PLANE_V] = (uint8*)(V);
+- img.stride[PLANE_Y] = y_stride;
+- img.stride[PLANE_U] = uv_stride;
+- img.stride[PLANE_V] = uv_stride;
++ img.planes[VPX_PLANE_Y] = (uint8*)(Y);
++ img.planes[VPX_PLANE_U] = (uint8*)(U);
++ img.planes[VPX_PLANE_V] = (uint8*)(V);
++ img.stride[VPX_PLANE_Y] = y_stride;
++ img.stride[VPX_PLANE_U] = uv_stride;
++ img.stride[VPX_PLANE_V] = uv_stride;
+
+ res = vpx_codec_encode(&enc, &img, 0, 1, 0, VPX_DL_BEST_QUALITY);
+
Copied: gd/repos/extra-x86_64/CVE-2016-3074.patch (from rev 267011, gd/trunk/CVE-2016-3074.patch)
===================================================================
--- extra-x86_64/CVE-2016-3074.patch (rev 0)
+++ extra-x86_64/CVE-2016-3074.patch 2016-05-06 08:38:35 UTC (rev 267012)
@@ -0,0 +1,105 @@
+From 2bb97f407c1145c850416a3bfbcc8cf124e68a19 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier at gentoo.org>
+Date: Sat, 16 Apr 2016 03:51:22 -0400
+Subject: gd2: handle corrupt images better (CVE-2016-3074)
+
+Make sure we do some range checking on corrupted chunks.
+
+Thanks to Hans Jerry Illikainen <hji at dyntopia.com> for indepth report
+and reproducer information. Made for easy test case writing :).
+---
+ .gitignore | 1 +
+ src/gd_gd2.c | 2 ++
+ tests/Makefile.am | 3 ++-
+ tests/gd2/gd2_read_corrupt.c | 25 +++++++++++++++++++++++++
+ tests/gd2/invalid_neg_size.gd2 | Bin 0 -> 1676 bytes
+ 5 files changed, 30 insertions(+), 1 deletion(-)
+ create mode 100644 tests/gd2/gd2_read_corrupt.c
+ create mode 100644 tests/gd2/invalid_neg_size.gd2
+
+diff --git a/.gitignore b/.gitignore
+index a68f3b9..35acd71 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -150,6 +150,7 @@ Makefile.in
+ /tests/gd2/gd2_im2im
+ /tests/gd2/gd2_null
+ /tests/gd2/gd2_read
++/tests/gd2/gd2_read_corrupt
+ /tests/gdimagearc/bug00079
+ /tests/gdimageline/gdimageline_aa
+ /tests/gdimageline/bug00072
+diff --git a/src/gd_gd2.c b/src/gd_gd2.c
+index 6f28461..a50b33d 100644
+--- a/src/gd_gd2.c
++++ b/src/gd_gd2.c
+@@ -165,6 +165,8 @@ _gd2GetHeader (gdIOCtxPtr in, int *sx, int *sy,
+ if (gdGetInt (&cidx[i].size, in) != 1) {
+ goto fail2;
+ };
++ if (cidx[i].offset < 0 || cidx[i].size < 0)
++ goto fail2;
+ };
+ *chunkIdx = cidx;
+ };
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index ed2c35b..b582266 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -129,7 +129,8 @@ endif
+
+ if HAVE_LIBZ
+ check_PROGRAMS += \
+- gd2/gd2_null
++ gd2/gd2_null \
++ gd2/gd2_read_corrupt
+ endif
+
+ if HAVE_LIBPNG
+diff --git a/tests/gd2/gd2_read_corrupt.c b/tests/gd2/gd2_read_corrupt.c
+new file mode 100644
+index 0000000..11f6a67
+--- /dev/null
++++ b/tests/gd2/gd2_read_corrupt.c
+@@ -0,0 +1,25 @@
++/* Just try to read the invalid gd2 image & not crash. */
++#include "gd.h"
++#include <stdio.h>
++#include <stdlib.h>
++#include "gdtest.h"
++
++int main()
++{
++ gdImagePtr im;
++ FILE *fp;
++ char path[1024];
++
++ /* Read the corrupt image. */
++ sprintf(path, "%s/gd2/invalid_neg_size.gd2", GDTEST_TOP_DIR);
++ fp = fopen(path, "rb");
++ if (!fp) {
++ printf("failed, cannot open file\n");
++ return 1;
++ }
++ im = gdImageCreateFromGd2(fp);
++ fclose(fp);
++
++ /* Should have failed & rejected it. */
++ return im == NULL ? 0 : 1;
++}
+diff --git a/tests/gd2/invalid_neg_size.gd2 b/tests/gd2/invalid_neg_size.gd2
+new file mode 100644
+index 0000000..3075f15
+--- /dev/null
++++ b/tests/gd2/invalid_neg_size.gd2
+@@ -0,0 +1,5 @@
++gd2 @ ) o ÿÿÿÿ
xd ÿAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAéeß²lP¬ñtoWØ;`å`è8jTH×Ôöð#&? åÏYøë$ÄT/ê göBf<7k°¾Ô<Pù¹âçùÖyÛÀðì¤Ã)`9Èê°Ö
++ÔBE3?sÑì¾´yhcÜã7K+`rq´¡Òä×ëWEEþbÉ2SJ÷MXnx´ÔâÕàHªµV¤QpY×ñô^ÒlNl©·j³â
cF
++Yãµ^o;rÆÏ5xò%Ñ<1Ýv¿µ|?±$¯]Ö¢Õ÷â÷ªñ¨R¤]èÓÑͦ}Ñ¥Ö9$«,wÊ[jAóò[Ü=©ýÎëÁ3Û«>.~!ƧXæûãåYº& [T7SöI& ü7`M1lOÄTa$Í®é
++²aeÊïÊ
¾Á~¦Æ}ûi¾}[)N÷Ëæ+%s75'=_ïһȽyMD1`»t÷òî·ØÆÈ
++p~,`:?©aÏVÖ?ñ*èèP×ÃIYbßËÏ°<§S$Vÿ6P¾¼á7Ü{9¡6Ñ1¹=áDæC 1}X~P¬þÛö»IvÍÇ3ðßoGK
+xØ1*xÍ Ø
+\ No newline at end of file
+--
+2.8.2
+
Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD 2016-05-06 08:34:45 UTC (rev 267011)
+++ extra-x86_64/PKGBUILD 2016-05-06 08:38:35 UTC (rev 267012)
@@ -1,43 +0,0 @@
-# $Id$
-
-pkgname=gd
-pkgver=2.1.1
-pkgrel=3
-pkgdesc="Library for the dynamic creation of images by programmers"
-arch=('i686' 'x86_64')
-url="http://www.libgd.org/"
-license=('custom')
-depends=('fontconfig' 'libvpx' 'libxpm' 'libtiff')
-makedepends=('git')
-optdepends=('perl: bdftogd script')
-source=("${pkgname}::git+https://github.com/libgd/libgd.git#tag=${pkgname}-${pkgver}"
- gd-2.1.1-libvpx-1.4.0.patch)
-md5sums=('SKIP'
- '9114dd8259aaa88b0a09188fe7b19afc')
-
-prepare() {
- cd ${pkgname}
- ./bootstrap.sh
- patch -p1 -i "${srcdir}/gd-2.1.1-libvpx-1.4.0.patch"
-}
-
-build() {
- cd ${pkgname}
- ./configure \
- --prefix=/usr \
- --disable-rpath \
- --with-vpx=/usr \
- --with-tiff=/usr
- make
-}
-
-check() {
- cd ${pkgname}
- make check
-}
-
-package() {
- cd ${pkgname}
- make DESTDIR="${pkgdir}" install
- install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-}
Copied: gd/repos/extra-x86_64/PKGBUILD (from rev 267011, gd/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD (rev 0)
+++ extra-x86_64/PKGBUILD 2016-05-06 08:38:35 UTC (rev 267012)
@@ -0,0 +1,45 @@
+# $Id$
+
+pkgname=gd
+pkgver=2.1.1
+pkgrel=4
+pkgdesc="Library for the dynamic creation of images by programmers"
+arch=('i686' 'x86_64')
+url="http://www.libgd.org/"
+license=('custom')
+depends=('fontconfig' 'libvpx' 'libxpm' 'libtiff')
+makedepends=('git')
+optdepends=('perl: bdftogd script')
+source=("${pkgname}::git+https://github.com/libgd/libgd.git#tag=${pkgname}-${pkgver}"
+ 'gd-2.1.1-libvpx-1.4.0.patch' 'CVE-2016-3074.patch')
+md5sums=('SKIP'
+ '9114dd8259aaa88b0a09188fe7b19afc'
+ '60d9ef94a60d9a77232b79da4b80626e')
+
+prepare() {
+ cd ${pkgname}
+ ./bootstrap.sh
+ patch -p1 -i "${srcdir}/gd-2.1.1-libvpx-1.4.0.patch"
+ patch -p1 -i "${srcdir}/CVE-2016-3074.patch"
+}
+
+build() {
+ cd ${pkgname}
+ ./configure \
+ --prefix=/usr \
+ --disable-rpath \
+ --with-vpx=/usr \
+ --with-tiff=/usr
+ make
+}
+
+check() {
+ cd ${pkgname}
+ make check
+}
+
+package() {
+ cd ${pkgname}
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
Deleted: extra-x86_64/gd-2.1.1-libvpx-1.4.0.patch
===================================================================
--- extra-x86_64/gd-2.1.1-libvpx-1.4.0.patch 2016-05-06 08:34:45 UTC (rev 267011)
+++ extra-x86_64/gd-2.1.1-libvpx-1.4.0.patch 2016-05-06 08:38:35 UTC (rev 267012)
@@ -1,37 +0,0 @@
-From d41eb72cd4545c394578332e5c102dee69e02ee8 Mon Sep 17 00:00:00 2001
-From: Remi Collet <fedora at famillecollet.com>
-Date: Tue, 7 Apr 2015 13:11:03 +0200
-Subject: [PATCH] Fix build with latest libvpx 1.4.0
-
-These new constants exist at least since 1.0.0
-Compatibility ones have been droped in 1.4.0
----
- src/webpimg.c | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/src/webpimg.c b/src/webpimg.c
-index cf73d64..e49fcc6 100644
---- a/src/webpimg.c
-+++ b/src/webpimg.c
-@@ -711,14 +711,14 @@ static WebPResult VPXEncode(const uint8* Y,
- codec_ctl(&enc, VP8E_SET_STATIC_THRESHOLD, 0);
- codec_ctl(&enc, VP8E_SET_TOKEN_PARTITIONS, 2);
-
-- vpx_img_wrap(&img, IMG_FMT_I420,
-+ vpx_img_wrap(&img, VPX_IMG_FMT_I420,
- y_width, y_height, 16, (uint8*)(Y));
-- img.planes[PLANE_Y] = (uint8*)(Y);
-- img.planes[PLANE_U] = (uint8*)(U);
-- img.planes[PLANE_V] = (uint8*)(V);
-- img.stride[PLANE_Y] = y_stride;
-- img.stride[PLANE_U] = uv_stride;
-- img.stride[PLANE_V] = uv_stride;
-+ img.planes[VPX_PLANE_Y] = (uint8*)(Y);
-+ img.planes[VPX_PLANE_U] = (uint8*)(U);
-+ img.planes[VPX_PLANE_V] = (uint8*)(V);
-+ img.stride[VPX_PLANE_Y] = y_stride;
-+ img.stride[VPX_PLANE_U] = uv_stride;
-+ img.stride[VPX_PLANE_V] = uv_stride;
-
- res = vpx_codec_encode(&enc, &img, 0, 1, 0, VPX_DL_BEST_QUALITY);
-
Copied: gd/repos/extra-x86_64/gd-2.1.1-libvpx-1.4.0.patch (from rev 267011, gd/trunk/gd-2.1.1-libvpx-1.4.0.patch)
===================================================================
--- extra-x86_64/gd-2.1.1-libvpx-1.4.0.patch (rev 0)
+++ extra-x86_64/gd-2.1.1-libvpx-1.4.0.patch 2016-05-06 08:38:35 UTC (rev 267012)
@@ -0,0 +1,37 @@
+From d41eb72cd4545c394578332e5c102dee69e02ee8 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora at famillecollet.com>
+Date: Tue, 7 Apr 2015 13:11:03 +0200
+Subject: [PATCH] Fix build with latest libvpx 1.4.0
+
+These new constants exist at least since 1.0.0
+Compatibility ones have been droped in 1.4.0
+---
+ src/webpimg.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/webpimg.c b/src/webpimg.c
+index cf73d64..e49fcc6 100644
+--- a/src/webpimg.c
++++ b/src/webpimg.c
+@@ -711,14 +711,14 @@ static WebPResult VPXEncode(const uint8* Y,
+ codec_ctl(&enc, VP8E_SET_STATIC_THRESHOLD, 0);
+ codec_ctl(&enc, VP8E_SET_TOKEN_PARTITIONS, 2);
+
+- vpx_img_wrap(&img, IMG_FMT_I420,
++ vpx_img_wrap(&img, VPX_IMG_FMT_I420,
+ y_width, y_height, 16, (uint8*)(Y));
+- img.planes[PLANE_Y] = (uint8*)(Y);
+- img.planes[PLANE_U] = (uint8*)(U);
+- img.planes[PLANE_V] = (uint8*)(V);
+- img.stride[PLANE_Y] = y_stride;
+- img.stride[PLANE_U] = uv_stride;
+- img.stride[PLANE_V] = uv_stride;
++ img.planes[VPX_PLANE_Y] = (uint8*)(Y);
++ img.planes[VPX_PLANE_U] = (uint8*)(U);
++ img.planes[VPX_PLANE_V] = (uint8*)(V);
++ img.stride[VPX_PLANE_Y] = y_stride;
++ img.stride[VPX_PLANE_U] = uv_stride;
++ img.stride[VPX_PLANE_V] = uv_stride;
+
+ res = vpx_codec_encode(&enc, &img, 0, 1, 0, VPX_DL_BEST_QUALITY);
+
More information about the arch-commits
mailing list