diff options
Diffstat (limited to 'dev-libs/libchewing')
-rw-r--r-- | dev-libs/libchewing/ChangeLog | 6 | ||||
-rw-r--r-- | dev-libs/libchewing/files/0.3.3-strncat-fix.patch | 13 | ||||
-rw-r--r-- | dev-libs/libchewing/libchewing-0.3.3.ebuild | 8 |
3 files changed, 24 insertions, 3 deletions
diff --git a/dev-libs/libchewing/ChangeLog b/dev-libs/libchewing/ChangeLog index c78f9093b2f4..c1952c649b6b 100644 --- a/dev-libs/libchewing/ChangeLog +++ b/dev-libs/libchewing/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-libs/libchewing # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libchewing/ChangeLog,v 1.27 2012/10/02 03:01:52 naota Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libchewing/ChangeLog,v 1.28 2012/10/04 22:35:30 naota Exp $ + + 04 Oct 2012; <naota@gentoo.org> +files/0.3.3-strncat-fix.patch, + libchewing-0.3.3.ebuild: + Patch strncat() to avoid buffer overflow. #434418 02 Oct 2012; <naota@gentoo.org> -libchewing-0.3.2-r1.ebuild, -libchewing-0.3.2.ebuild: diff --git a/dev-libs/libchewing/files/0.3.3-strncat-fix.patch b/dev-libs/libchewing/files/0.3.3-strncat-fix.patch new file mode 100644 index 000000000000..8f2676c0c2b7 --- /dev/null +++ b/dev-libs/libchewing/files/0.3.3-strncat-fix.patch @@ -0,0 +1,13 @@ +diff --git a/src/tree.c b/src/tree.c +index 7e8f665..89ad0d5 100644 +--- a/src/tree.c ++++ b/src/tree.c +@@ -586,7 +586,7 @@ static void LoadChar( char *buf, int buf_len, uint16 phoneSeq[], int nPhoneSeq ) + memset(buf, 0, buf_len); + for ( i = 0; i < nPhoneSeq; i++ ) { + GetCharFirst( &word, phoneSeq[ i ] ); +- strncat(buf, word.word, buf_len); ++ strncat(buf, word.word, buf_len - strlen(buf) - 1); + } + buf[ buf_len - 1 ] = '\0'; + } diff --git a/dev-libs/libchewing/libchewing-0.3.3.ebuild b/dev-libs/libchewing/libchewing-0.3.3.ebuild index a3c79d0edf0f..03ad07ae8fb6 100644 --- a/dev-libs/libchewing/libchewing-0.3.3.ebuild +++ b/dev-libs/libchewing/libchewing-0.3.3.ebuild @@ -1,10 +1,10 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libchewing/libchewing-0.3.3.ebuild,v 1.5 2012/09/23 07:50:00 phajdan.jr Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libchewing/libchewing-0.3.3.ebuild,v 1.6 2012/10/04 22:35:30 naota Exp $ EAPI=3 -inherit multilib toolchain-funcs +inherit multilib toolchain-funcs eutils DESCRIPTION="Library for Chinese Phonetic input method" HOMEPAGE="http://chewing.csie.net/" @@ -23,6 +23,10 @@ DEPEND="${RDEPEND} >=dev-libs/check-0.9.4 )" +src_prepare() { + epatch "${FILESDIR}"/${PV}-strncat-fix.patch +} + src_configure() { export CC_FOR_BUILD="$(tc-getBUILD_CC)" econf $(use_enable debug) \ |