diff options
author | Alexis Ballier <aballier@gentoo.org> | 2010-05-02 07:54:00 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2010-05-02 07:54:00 +0000 |
commit | 1676720aee758dd0d907b5da0d8c3889d43771e7 (patch) | |
tree | c819c06e12383bb30d37e7cdb0ac1a26797f8904 /media-libs | |
parent | Version bump (diff) | |
download | historical-1676720aee758dd0d907b5da0d8c3889d43771e7.tar.gz historical-1676720aee758dd0d907b5da0d8c3889d43771e7.tar.bz2 historical-1676720aee758dd0d907b5da0d8c3889d43771e7.zip |
fix unaligned reads; bug #304921
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/silgraphite/ChangeLog | 6 | ||||
-rw-r--r-- | media-libs/silgraphite/Manifest | 15 | ||||
-rw-r--r-- | media-libs/silgraphite/files/silgraphite-2.3.1-aligned_access.patch | 63 | ||||
-rw-r--r-- | media-libs/silgraphite/silgraphite-2.3.1.ebuild | 8 |
4 files changed, 88 insertions, 4 deletions
diff --git a/media-libs/silgraphite/ChangeLog b/media-libs/silgraphite/ChangeLog index 87648ba0fad3..040122f6f4cf 100644 --- a/media-libs/silgraphite/ChangeLog +++ b/media-libs/silgraphite/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-libs/silgraphite # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/silgraphite/ChangeLog,v 1.12 2010/04/26 18:43:03 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/silgraphite/ChangeLog,v 1.13 2010/05/02 07:54:00 aballier Exp $ + + 02 May 2010; Alexis Ballier <aballier@gentoo.org> + silgraphite-2.3.1.ebuild, +files/silgraphite-2.3.1-aligned_access.patch: + fix unaligned reads; bug #304921 26 Apr 2010; Fabian Groffen <grobian@gentoo.org> silgraphite-2.3.1.ebuild: Marked ~sparc-solaris, ~sparc64-solaris diff --git a/media-libs/silgraphite/Manifest b/media-libs/silgraphite/Manifest index d15226893c9e..c50ea1bfb0d3 100644 --- a/media-libs/silgraphite/Manifest +++ b/media-libs/silgraphite/Manifest @@ -1,4 +1,15 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX silgraphite-2.3.1-aligned_access.patch 2127 RMD160 3fc73016466090c309c560d804fe1d631982bef8 SHA1 86a47c0bcf8d72aae1e1f03e85ab2f968c96326e SHA256 6a995237dce8fd8848b965bf9d5ab653025f0be23ab86e08ea4639b49526dc1b DIST silgraphite-2.3.1.tar.gz 3239482 RMD160 baaf57ff95622bff9fc3908ae55872789eab5836 SHA1 fffd16e1aa24ff0afdc39aaf534323e23d5b8464 SHA256 9b07c6e91108b1fa87411af4a57e25522784cfea0deb79b34ced608444f2ed65 -EBUILD silgraphite-2.3.1.ebuild 994 RMD160 26ef65f75caad6a11e9895c6f38f43450d8357f8 SHA1 9558d96e8771c7705c920c14ec3bf00e958a1a23 SHA256 607d4b4fb14a4a7b9fe920d4fe16451cc5b87770e27cd2840750f87daf80690c -MISC ChangeLog 1566 RMD160 303e9e0cd4be0d3595d50dbe6fc0565067596efc SHA1 0c6b6a0ecd6d811d522f99474f3666c7e701d46b SHA256 bcdb2a19be99eb3847258ac2252d2b3fc4b4733caaf947236b8c54f2487a6d15 +EBUILD silgraphite-2.3.1.ebuild 1078 RMD160 d4ad78b59547bb6d4e0ddda573df594ae50138b7 SHA1 77e8b0af73c3eeb4587b3e497d91960478eb852d SHA256 fdfa824c570d4ff384de37d5639952a27c6dc96caaca6bf1a2f3e76dca1c29c1 +MISC ChangeLog 1730 RMD160 7b21158ee4472030e452f7d0be5c85e9404393ff SHA1 e4a6c139e90f5b8ccd802b31710843aa741182f1 SHA256 43fa07fd8083bf66affcb1919c6335363499982108674dfaefd97e711f5ffbc6 MISC metadata.xml 237 RMD160 d7819e84b80a048874f8516ed3af01aa44422e2a SHA1 7f3e2a809f6b0150dba63309cbe910a1d4213bab SHA256 cd2ca1a5bd2e81b16bd6d82c5ca8644118af9142c635ff77354b898b9f66444d +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.15 (GNU/Linux) + +iEYEARECAAYFAkvdL50ACgkQvFcC4BYPU0oV4ACfV0SIc+fAcVpoC2aBuc9I803w +aDEAn1BRrrcd24S0qTDsLWTiUAIASlrP +=zU1j +-----END PGP SIGNATURE----- diff --git a/media-libs/silgraphite/files/silgraphite-2.3.1-aligned_access.patch b/media-libs/silgraphite/files/silgraphite-2.3.1-aligned_access.patch new file mode 100644 index 000000000000..ee5c1702e92e --- /dev/null +++ b/media-libs/silgraphite/files/silgraphite-2.3.1-aligned_access.patch @@ -0,0 +1,63 @@ +Fix unaligned reads. +https://bugs.gentoo.org/show_bug.cgi?id=304921 + +Upstream: +https://sourceforge.net/tracker/?func=detail&aid=2995413&group_id=66144&atid=513479 + +Index: silgraphite-2.3.1/engine/src/segment/FileInput.cpp +=================================================================== +--- silgraphite-2.3.1.orig/engine/src/segment/FileInput.cpp ++++ silgraphite-2.3.1/engine/src/segment/FileInput.cpp +@@ -41,6 +41,10 @@ DEFINE_THIS_FILE + + //:End Ignore + ++#define RAW_READ(var,size,buf) \ ++ for(int i = 0; i < isizeof(size);i++){\ ++ var |= buf[i]<<8*(isizeof(size)-i-1);\ ++ } + //:>******************************************************************************************** + //:> Forward declarations + //:>******************************************************************************************** +@@ -133,11 +137,11 @@ byte GrBufferIStream::ReadByteFromFont() + ----------------------------------------------------------------------------------------------*/ + short GrBufferIStream::ReadShortFromFont() + { +- short snInput = *(short *)m_pbNext; ++ short snInput = 0; ++ RAW_READ(snInput,short,m_pbNext); + m_pbNext += isizeof(short); + if (m_pbLim && m_pbNext > m_pbLim) + THROW(kresReadFault); +- snInput = lsbf(snInput); + return snInput; + } + +@@ -147,11 +151,11 @@ short GrBufferIStream::ReadShortFromFont + ----------------------------------------------------------------------------------------------*/ + utf16 GrBufferIStream::ReadUShortFromFont() + { +- utf16 chwInput = *(utf16 *)m_pbNext; ++ utf16 chwInput = 0; ++ RAW_READ(chwInput,utf16,m_pbNext); + m_pbNext += isizeof(utf16); + if (m_pbLim && m_pbNext > m_pbLim) + THROW(kresReadFault); +- chwInput = lsbf(chwInput); + return chwInput; + } + +@@ -161,11 +165,11 @@ utf16 GrBufferIStream::ReadUShortFromFon + ----------------------------------------------------------------------------------------------*/ + int GrBufferIStream::ReadIntFromFont() + { +- int nInput = *(int *)m_pbNext; ++ int nInput = 0; ++ RAW_READ(nInput,int,m_pbNext); + m_pbNext += isizeof(int); + if (m_pbLim && m_pbNext > m_pbLim) + THROW(kresReadFault); +- nInput = lsbf(nInput); + return nInput; + } + diff --git a/media-libs/silgraphite/silgraphite-2.3.1.ebuild b/media-libs/silgraphite/silgraphite-2.3.1.ebuild index f255ff4b5005..eb45c81e5c55 100644 --- a/media-libs/silgraphite/silgraphite-2.3.1.ebuild +++ b/media-libs/silgraphite/silgraphite-2.3.1.ebuild @@ -1,9 +1,11 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/silgraphite/silgraphite-2.3.1.ebuild,v 1.12 2010/04/26 18:43:03 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/silgraphite/silgraphite-2.3.1.ebuild,v 1.13 2010/05/02 07:54:00 aballier Exp $ EAPI="2" +inherit eutils + DESCRIPTION="Rendering engine for complex non-Roman writing systems" HOMEPAGE="http://graphite.sil.org/" SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz" @@ -19,6 +21,10 @@ RDEPEND="xft? ( x11-libs/libXft ) DEPEND="${RDEPEND} dev-util/pkgconfig" +src_prepare() { + epatch "${FILESDIR}/${P}-aligned_access.patch" +} + src_configure() { econf \ $(use_with xft) \ |