From owner-svn-ports-all@freebsd.org Thu Feb 18 23:16:40 2016 Return-Path: Delivered-To: svn-ports-all@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 3DF96AAD656; Thu, 18 Feb 2016 23:16:40 +0000 (UTC) (envelope-from feld@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 E5B7CB89; Thu, 18 Feb 2016 23:16:39 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1INGctC048732; Thu, 18 Feb 2016 23:16:38 GMT (envelope-from feld@FreeBSD.org) Received: (from feld@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1INGcg9048730; Thu, 18 Feb 2016 23:16:38 GMT (envelope-from feld@FreeBSD.org) Message-Id: <201602182316.u1INGcg9048730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: feld set sender to feld@FreeBSD.org using -f From: Mark Felder Date: Thu, 18 Feb 2016 23:16:38 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r409140 - in branches/2016Q1/graphics/silgraphite: . 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2016 23:16:40 -0000 Author: feld Date: Thu Feb 18 23:16:38 2016 New Revision: 409140 URL: https://svnweb.freebsd.org/changeset/ports/409140 Log: MFH: r409139 graphics/silgraphite: Patch vulnerability Submitted by: truckman Security: http://www.vuxml.org/freebsd/8f10fa04-cf6a-11e5-96d6-14dae9d210b8.html Approved by: ports-secteam (with hat) Added: branches/2016Q1/graphics/silgraphite/files/patch-engine_src_font_TtfUtil.cpp - copied unchanged from r409139, head/graphics/silgraphite/files/patch-engine_src_font_TtfUtil.cpp Modified: branches/2016Q1/graphics/silgraphite/Makefile Directory Properties: branches/2016Q1/ (props changed) Modified: branches/2016Q1/graphics/silgraphite/Makefile ============================================================================== --- branches/2016Q1/graphics/silgraphite/Makefile Thu Feb 18 23:15:27 2016 (r409139) +++ branches/2016Q1/graphics/silgraphite/Makefile Thu Feb 18 23:16:38 2016 (r409140) @@ -3,7 +3,7 @@ PORTNAME= silgraphite PORTVERSION= 2.3.1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= graphics devel MASTER_SITES= SF Copied: branches/2016Q1/graphics/silgraphite/files/patch-engine_src_font_TtfUtil.cpp (from r409139, head/graphics/silgraphite/files/patch-engine_src_font_TtfUtil.cpp) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2016Q1/graphics/silgraphite/files/patch-engine_src_font_TtfUtil.cpp Thu Feb 18 23:16:38 2016 (r409140, copy of r409139, head/graphics/silgraphite/files/patch-engine_src_font_TtfUtil.cpp) @@ -0,0 +1,20 @@ +--- engine/src/font/TtfUtil.cpp.orig 2009-01-29 08:33:19 UTC ++++ engine/src/font/TtfUtil.cpp +@@ -1106,7 +1106,7 @@ size_t LocaLookup(gr::gid16 nGlyphId, + // CheckTable verifies the index_to_loc_format is valid + if (read(pTable->index_to_loc_format) == Sfnt::FontHeader::ShortIndexLocFormat) + { // loca entries are two bytes and have been divided by two +- if (nGlyphId <= (lLocaSize >> 1) - 1) // allow sentinel value to be accessed ++ if (lLocaSize >= 2 && nGlyphId <= (lLocaSize >> 1) - 1) // allow sentinel value to be accessed + { + const uint16 * pTable = reinterpret_cast(pLoca); + return (read(pTable[nGlyphId]) << 1); +@@ -1115,7 +1115,7 @@ size_t LocaLookup(gr::gid16 nGlyphId, + + if (read(pTable->index_to_loc_format) == Sfnt::FontHeader::LongIndexLocFormat) + { // loca entries are four bytes +- if (nGlyphId <= (lLocaSize >> 2) - 1) ++ if (lLocaSize >= 4 && nGlyphId <= (lLocaSize >> 2) - 1) + { + const uint32 * pTable = reinterpret_cast(pLoca); + return read(pTable[nGlyphId]);