From owner-svn-ports-branches@FreeBSD.ORG Tue Feb 17 22:04:28 2015 Return-Path: Delivered-To: svn-ports-branches@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 219CD10C; Tue, 17 Feb 2015 22:04:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 E80C7C2F; Tue, 17 Feb 2015 22:04:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1HM4RJj065230; Tue, 17 Feb 2015 22:04:27 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1HM4Re1065227; Tue, 17 Feb 2015 22:04:27 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201502172204.t1HM4Re1065227@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 17 Feb 2015 22:04:27 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r379194 - in branches/2015Q1/archivers/unzip: . files X-SVN-Group: ports-branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2015 22:04:28 -0000 Author: delphij Date: Tue Feb 17 22:04:26 2015 New Revision: 379194 URL: https://svnweb.freebsd.org/changeset/ports/379194 QAT: https://qat.redports.org/buildarchive/r379194/ Log: MFH: r379192 Apply fix for CVE-2015-1315 from Marc Deslauriers . Approved by: ports-secteam Modified: branches/2015Q1/archivers/unzip/Makefile branches/2015Q1/archivers/unzip/files/extra-iconv-patch-unix_unix.c Directory Properties: branches/2015Q1/ (props changed) Modified: branches/2015Q1/archivers/unzip/Makefile ============================================================================== --- branches/2015Q1/archivers/unzip/Makefile Tue Feb 17 22:03:32 2015 (r379193) +++ branches/2015Q1/archivers/unzip/Makefile Tue Feb 17 22:04:26 2015 (r379194) @@ -3,7 +3,7 @@ PORTNAME= unzip PORTVERSION= 6.0 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= archivers MASTER_SITES= SF/infozip/UnZip%206.x%20%28latest%29/UnZip%20${PORTVERSION}/:main \ SF/infozip/UnZip%205.x%20and%20earlier/5.51/:unreduce Modified: branches/2015Q1/archivers/unzip/files/extra-iconv-patch-unix_unix.c ============================================================================== --- branches/2015Q1/archivers/unzip/files/extra-iconv-patch-unix_unix.c Tue Feb 17 22:03:32 2015 (r379193) +++ branches/2015Q1/archivers/unzip/files/extra-iconv-patch-unix_unix.c Tue Feb 17 22:04:26 2015 (r379194) @@ -76,15 +76,27 @@ + + slen = strlen(string); + s = string; -+ dlen = buflen = 2*slen; -+ d = buf = malloc(buflen + 1); ++ ++ /* Make sure OUTBUFSIZ + 1 never ends up smaller than FILNAMSIZ ++ * as this function also gets called with G.outbuf in fileio.c ++ */ ++ buflen = FILNAMSIZ; ++ if (OUTBUFSIZ + 1 < FILNAMSIZ) ++ { ++ buflen = OUTBUFSIZ + 1; ++ } ++ ++ d = buf = malloc(buflen); + if(!d) + goto cleanup; ++ + bzero(buf,buflen); ++ dlen = buflen - 1; ++ + if(iconv(cd, &s, &slen, &d, &dlen) == (size_t)-1) + goto cleanup; + strncpy(string, buf, buflen); -+ ++ + cleanup: + free(buf); + iconv_close(cd);