[arch-commits] Commit in gd/trunk (3 files)

Pierre Schmitz pierre at archlinux.org
Sat Jul 23 11:32:37 UTC 2016


    Date: Saturday, July 23, 2016 @ 11:32:36
  Author: pierre
Revision: 272166

upgpkg: gd 2.2.3-1

Modified:
  gd/trunk/PKGBUILD
Deleted:
  gd/trunk/CVE-2016-3074.patch
  gd/trunk/gd-2.1.1-libvpx-1.4.0.patch

-----------------------------+
 CVE-2016-3074.patch         |  104 ------------------------------------------
 PKGBUILD                    |   29 +++--------
 gd-2.1.1-libvpx-1.4.0.patch |   37 --------------
 3 files changed, 9 insertions(+), 161 deletions(-)

Deleted: CVE-2016-3074.patch
===================================================================
--- CVE-2016-3074.patch	2016-07-23 11:05:17 UTC (rev 272165)
+++ CVE-2016-3074.patch	2016-07-23 11:32:36 UTC (rev 272166)
@@ -1,105 +0,0 @@
-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ß²l”P¬ƒñtoWØ;`å`è8jTH×Ôöð#&? åÏYøëŠ$ÄT­/ê	”göBƒf<7““k°‚¾ÔŸ<Pù¹âçùÖyÛÀðì¤Ã)`9“ŒÈê°˜Ö
-+ÔBE3?sÑì¾´yhcÜã7K+`rq´¡Òä×ë’WEEþb‰É2SŽJ÷MXnx´ÔŠâÕàHªµV¤QpY×ñô^ÒlNl©˜·j³‹â…cF
-+Yãµ^o;rÆÏ5xòœ%Ñ<Ž1Ýv¿µ‹|?±$¯]Ö¢™Õ÷â÷ª­ñƒ¨ŸR¤]èŒÓÑ͇¦}Ñ¥‰Ö9$«,wÊ[jAóò[Üž”„=©ýÎëƒÁ3Û«>.~!ƧX™æ­ûãåYº& [T7S­öI‡&Š	ü7`M1lOÄTa$Í®Žé
-+²aeÊïÊ…¾‡Á~¦Æ}ûi¾}‹„[)N÷Ëæ+%s75'=‡_ïҍ‹»È½yMD1`»t÷òî·ØÆÈ
-+p~,`:?©aÏVÖ?ñ˜*èžè›P×ÃIYbßËÏ°<§S$Vÿ6P¾¼á7Ü{9–¡6Ñ1¹=áDæC 1}•X~P”¬þÛö»IŽvÍÇ3ŸðßoGK­
-xØ1*x–Í	Ø
-\ No newline at end of file
--- 
-2.8.2
-

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-07-23 11:05:17 UTC (rev 272165)
+++ PKGBUILD	2016-07-23 11:32:36 UTC (rev 272166)
@@ -1,30 +1,19 @@
 # $Id$
 
 pkgname=gd
-pkgver=2.1.1
-pkgrel=4
+pkgver=2.2.3
+pkgrel=1
 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')
+depends=('fontconfig' 'libvpx' 'libxpm' 'libtiff' 'libwebp')
 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')
+source=("https://github.com/libgd/libgd/releases/download/gd-${pkgver}/libgd-${pkgver}.tar.xz")
+md5sums=('14e4134c129b4c166c3a0549a32ef340')
 
-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}
+  cd libgd-${pkgver}
   ./configure \
     --prefix=/usr \
     --disable-rpath \
@@ -34,12 +23,12 @@
 }
 
 check() {
-  cd ${pkgname}
-  make check
+  cd libgd-${pkgver}
+  [[ ${CARCH} == 'i686' ]] || make check
 }
 
 package() {
-  cd ${pkgname}
+  cd libgd-${pkgver}
   make DESTDIR="${pkgdir}" install
   install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
 }

Deleted: gd-2.1.1-libvpx-1.4.0.patch
===================================================================
--- gd-2.1.1-libvpx-1.4.0.patch	2016-07-23 11:05:17 UTC (rev 272165)
+++ gd-2.1.1-libvpx-1.4.0.patch	2016-07-23 11:32:36 UTC (rev 272166)
@@ -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);
- 



More information about the arch-commits mailing list