From owner-svn-ports-head@freebsd.org Wed Sep 28 08:20:48 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88809BEC2E6; Wed, 28 Sep 2016 08:20:48 +0000 (UTC) (envelope-from ale@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C6E91595; Wed, 28 Sep 2016 08:20:48 +0000 (UTC) (envelope-from ale@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S8Kleb047400; Wed, 28 Sep 2016 08:20:47 GMT (envelope-from ale@FreeBSD.org) Received: (from ale@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S8KlNU046861; Wed, 28 Sep 2016 08:20:47 GMT (envelope-from ale@FreeBSD.org) Message-Id: <201609280820.u8S8KlNU046861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ale set sender to ale@FreeBSD.org using -f From: Alex Dupre Date: Wed, 28 Sep 2016 08:20:47 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r422858 - in head/graphics: php55-gd php55-gd/files php56-gd php56-gd/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 08:20:48 -0000 Author: ale Date: Wed Sep 28 08:20:46 2016 New Revision: 422858 URL: https://svnweb.freebsd.org/changeset/ports/422858 Log: Fix integer overflow in gdImageWebpCtx and bump PORTREVISION. PR: 213023 Submitted by: Vladimir Krstulja Added: head/graphics/php55-gd/files/patch-libgd_gd_webp.c (contents, props changed) head/graphics/php56-gd/files/patch-libgd_gd_webp.c (contents, props changed) Modified: head/graphics/php55-gd/Makefile head/graphics/php55-gd/files/patch-config.m4 head/graphics/php56-gd/Makefile head/graphics/php56-gd/files/patch-config.m4 Modified: head/graphics/php55-gd/Makefile ============================================================================== --- head/graphics/php55-gd/Makefile Wed Sep 28 08:17:03 2016 (r422857) +++ head/graphics/php55-gd/Makefile Wed Sep 28 08:20:46 2016 (r422858) @@ -1,7 +1,7 @@ # Created by: Alex Dupre # $FreeBSD$ -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics MASTERDIR= ${.CURDIR}/../../lang/php55 Modified: head/graphics/php55-gd/files/patch-config.m4 ============================================================================== --- head/graphics/php55-gd/files/patch-config.m4 Wed Sep 28 08:17:03 2016 (r422857) +++ head/graphics/php55-gd/files/patch-config.m4 Wed Sep 28 08:20:46 2016 (r422858) @@ -1,6 +1,6 @@ ---- config.m4.orig 2013-12-11 00:31:06.000000000 +0100 -+++ config.m4 2013-12-24 21:11:19.000000000 +0100 -@@ -233,7 +233,7 @@ +--- config.m4.orig 2016-07-20 10:41:48.000000000 +0200 ++++ config.m4 2016-09-28 10:06:48.173731000 +0200 +@@ -228,7 +228,7 @@ AC_DEFUN([PHP_GD_T1LIB],[ ],[ AC_MSG_ERROR([Problem with libt1.(a|so). Please check config.log for more information.]) ],[ Added: head/graphics/php55-gd/files/patch-libgd_gd_webp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/php55-gd/files/patch-libgd_gd_webp.c Wed Sep 28 08:20:46 2016 (r422858) @@ -0,0 +1,18 @@ +--- libgd/gd_webp.c.orig 2016-09-28 10:07:06.092196000 +0200 ++++ libgd/gd_webp.c 2016-09-28 10:08:12.429030000 +0200 +@@ -180,6 +180,15 @@ void gdImageWebpCtx (gdImagePtr im, gdIO + /* Conversion to Y,U,V buffer */ + yuv_width = (width + 1) >> 1; + yuv_height = (height + 1) >> 1; ++ ++ if (overflow2(width, height)) { ++ return; ++ } ++ /* simplification possible, because WebP must not be larger than 16384**2 */ ++ if (overflow2(width * height, 2 * sizeof(unsigned char))) { ++ return; ++ } ++ + yuv_nbytes = width * height + 2 * yuv_width * yuv_height; + + if ((Y = (unsigned char *)gdCalloc(yuv_nbytes, sizeof(unsigned char))) == NULL) { Modified: head/graphics/php56-gd/Makefile ============================================================================== --- head/graphics/php56-gd/Makefile Wed Sep 28 08:17:03 2016 (r422857) +++ head/graphics/php56-gd/Makefile Wed Sep 28 08:20:46 2016 (r422858) @@ -1,6 +1,7 @@ # Created by: Alex Dupre # $FreeBSD$ +PORTREVISION= 1 CATEGORIES= graphics MASTERDIR= ${.CURDIR}/../../lang/php56 Modified: head/graphics/php56-gd/files/patch-config.m4 ============================================================================== --- head/graphics/php56-gd/files/patch-config.m4 Wed Sep 28 08:17:03 2016 (r422857) +++ head/graphics/php56-gd/files/patch-config.m4 Wed Sep 28 08:20:46 2016 (r422858) @@ -1,6 +1,6 @@ ---- config.m4.orig 2013-12-11 00:31:06.000000000 +0100 -+++ config.m4 2013-12-24 21:11:19.000000000 +0100 -@@ -233,7 +233,7 @@ +--- config.m4.orig 2016-09-15 23:02:50.000000000 +0200 ++++ config.m4 2016-09-28 10:10:26.335642000 +0200 +@@ -228,7 +228,7 @@ AC_DEFUN([PHP_GD_T1LIB],[ ],[ AC_MSG_ERROR([Problem with libt1.(a|so). Please check config.log for more information.]) ],[ Added: head/graphics/php56-gd/files/patch-libgd_gd_webp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/php56-gd/files/patch-libgd_gd_webp.c Wed Sep 28 08:20:46 2016 (r422858) @@ -0,0 +1,18 @@ +--- libgd/gd_webp.c.orig 2016-09-28 10:07:06.092196000 +0200 ++++ libgd/gd_webp.c 2016-09-28 10:08:12.429030000 +0200 +@@ -180,6 +180,15 @@ void gdImageWebpCtx (gdImagePtr im, gdIO + /* Conversion to Y,U,V buffer */ + yuv_width = (width + 1) >> 1; + yuv_height = (height + 1) >> 1; ++ ++ if (overflow2(width, height)) { ++ return; ++ } ++ /* simplification possible, because WebP must not be larger than 16384**2 */ ++ if (overflow2(width * height, 2 * sizeof(unsigned char))) { ++ return; ++ } ++ + yuv_nbytes = width * height + 2 * yuv_width * yuv_height; + + if ((Y = (unsigned char *)gdCalloc(yuv_nbytes, sizeof(unsigned char))) == NULL) {