From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D00FB1381F3 for ; Sat, 30 Dec 2017 22:46:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E9EC7E0822; Sat, 30 Dec 2017 22:46:12 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C8079E0822 for ; Sat, 30 Dec 2017 22:46:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A6747335C0E for ; Sat, 30 Dec 2017 22:46:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 32217A8 for ; Sat, 30 Dec 2017 22:46:09 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1514673963.521efc21ffc6e32dd4b14c15f3386d837817610d.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/, media-gfx/fontforge/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-gfx/fontforge/files/20170731-gethex-unaligned.patch media-gfx/fontforge/fontforge-20170731-r2.ebuild media-gfx/fontforge/fontforge-20170731-r3.ebuild X-VCS-Directories: media-gfx/fontforge/files/ media-gfx/fontforge/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 521efc21ffc6e32dd4b14c15f3386d837817610d X-VCS-Branch: master Date: Sat, 30 Dec 2017 22:46:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 2f0de2aa-fe77-4d36-9fd9-6f656dfcb050 X-Archives-Hash: 48e8129a73a03a72e24cedad08cfe84e commit: 521efc21ffc6e32dd4b14c15f3386d837817610d Author: Mike Gilbert gentoo org> AuthorDate: Sat Dec 30 22:45:38 2017 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Sat Dec 30 22:46:03 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=521efc21 media-gfx/fontforge: fix misaligned memory access Patch by Rolf Eike Beer. Closes: https://bugs.gentoo.org/642756 Package-Manager: Portage-2.3.19_p3, Repoman-2.3.6_p37 .../files/20170731-gethex-unaligned.patch | 22 ++++++++++++++++++++++ ...0731-r2.ebuild => fontforge-20170731-r3.ebuild} | 1 + 2 files changed, 23 insertions(+) diff --git a/media-gfx/fontforge/files/20170731-gethex-unaligned.patch b/media-gfx/fontforge/files/20170731-gethex-unaligned.patch new file mode 100644 index 00000000000..812f7a44472 --- /dev/null +++ b/media-gfx/fontforge/files/20170731-gethex-unaligned.patch @@ -0,0 +1,22 @@ +fix unaligned access in gethex() + +--- a/fontforge/sfd.c ++++ b/fontforge/sfd.c +@@ -3393,6 +3393,7 @@ + static int gethex(FILE *sfd, uint32 *val) { + char tokbuf[100]; int ch; + char *pt=tokbuf, *end = tokbuf+100-2; ++ uint32 u; + + while ( isspace(ch = nlgetc(sfd))); + if ( ch=='#' ) +@@ -3416,7 +3417,8 @@ + } + *pt='\0'; + ungetc(ch,sfd); +- *val = strtoul(tokbuf,NULL,16); ++ u = strtoul(tokbuf,NULL,16); ++ memcpy(val, &u, sizeof(u)); + return( pt!=tokbuf?1:ch==EOF?-1: 0 ); + } + diff --git a/media-gfx/fontforge/fontforge-20170731-r2.ebuild b/media-gfx/fontforge/fontforge-20170731-r3.ebuild similarity index 98% rename from media-gfx/fontforge/fontforge-20170731-r2.ebuild rename to media-gfx/fontforge/fontforge-20170731-r3.ebuild index c8ad245b14d..ae146eb0647 100644 --- a/media-gfx/fontforge/fontforge-20170731-r2.ebuild +++ b/media-gfx/fontforge/fontforge-20170731-r3.ebuild @@ -65,6 +65,7 @@ S="${WORKDIR}/fontforge-2.0.${PV}" PATCHES=( "${FILESDIR}"/20170731-startnoui-FindOrMakeEncoding.patch "${FILESDIR}"/20170731-tilepath.patch + "${FILESDIR}"/20170731-gethex-unaligned.patch ) pkg_setup() {