summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Bar-Lev <alonbl@gentoo.org>2012-12-22 20:12:55 +0000
committerAlon Bar-Lev <alonbl@gentoo.org>2012-12-22 20:12:55 +0000
commit3d7dc93e6278fde04e92cfe4a1a8fead71c07c1c (patch)
tree46176a340f354f4f85d80f585af7ab9c31527f05 /app-crypt/mcrypt
parentAdd ~ppc, wrt bug #411909 (diff)
downloadhistorical-3d7dc93e6278fde04e92cfe4a1a8fead71c07c1c.tar.gz
historical-3d7dc93e6278fde04e92cfe4a1a8fead71c07c1c.tar.bz2
historical-3d7dc93e6278fde04e92cfe4a1a8fead71c07c1c.zip
Fix segv issues with short content, per bug#426914
Package-Manager: portage-2.2.0_alpha149/cvs/Linux x86_64
Diffstat (limited to 'app-crypt/mcrypt')
-rw-r--r--app-crypt/mcrypt/ChangeLog8
-rw-r--r--app-crypt/mcrypt/Manifest4
-rw-r--r--app-crypt/mcrypt/files/mcrypt-2.6.8-segv.patch40
-rw-r--r--app-crypt/mcrypt/mcrypt-2.6.8-r2.ebuild36
4 files changed, 86 insertions, 2 deletions
diff --git a/app-crypt/mcrypt/ChangeLog b/app-crypt/mcrypt/ChangeLog
index 8b2965ccc32f..79a59774c5f8 100644
--- a/app-crypt/mcrypt/ChangeLog
+++ b/app-crypt/mcrypt/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-crypt/mcrypt
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/mcrypt/ChangeLog,v 1.34 2012/02/18 08:34:38 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/mcrypt/ChangeLog,v 1.35 2012/12/22 20:12:50 alonbl Exp $
+
+*mcrypt-2.6.8-r2 (22 Dec 2012)
+
+ 22 Dec 2012; Alon Bar-Lev <alonbl@gentoo.org> +files/mcrypt-2.6.8-segv.patch,
+ +mcrypt-2.6.8-r2.ebuild:
+ Fix segv issues with short content, per bug#426914
18 Feb 2012; Tim Harder <radhermit@gentoo.org> mcrypt-2.6.8-r1.ebuild,
files/mcrypt-2.6.8-stdlib.h.patch:
diff --git a/app-crypt/mcrypt/Manifest b/app-crypt/mcrypt/Manifest
index 5d686a1d6ae3..a4095ba6bcf7 100644
--- a/app-crypt/mcrypt/Manifest
+++ b/app-crypt/mcrypt/Manifest
@@ -1,6 +1,8 @@
AUX mcrypt-2.6.7-qa.patch 736 SHA256 8cf4a65124e6354797e7c37f54a182758d3b24f1789c04948ab71dde6309c643 SHA512 f50e2db738583b5dbca80e7458cc341787b94bd475b699de1333e4839b1bc448c0a6d7c759a71849c60fc97d45dbb0f075ad6c5d67d312865eea26118bba4dee WHIRLPOOL f02ecd9a785d2edd1eb28553f714ff93063d64704f04a522323a7e731264e500b845e7bf314b902265b130849760526f99f72d0b15030f3d14f026043d08aa11
+AUX mcrypt-2.6.8-segv.patch 1330 SHA256 3d93cbb71c9148fbf01a5ce2fe57bd78c33e93acb6fa2d79b756f4d1132436e9 SHA512 7bea9f7731f39d2fed3920cbf6efaf006681e59eaa5dc3a0e50ac0cd3166c959e1ebd06c449329865501bd525a22c49380c4f72b27693f8bc0b0c0c4141a5af2 WHIRLPOOL 5a2e0f71b5237da83fe15556daa9a109ae0b74d63cce5220a1167e1030da92c3b4a8c80beece96e77974391bb34d262887d8bea4725fbe26a2e7a7981359cf01
AUX mcrypt-2.6.8-stdlib.h.patch 258 SHA256 367c47727919f3142893eef897b66b9d38e81d20a49de11b421dc40965683b6f SHA512 fdf9334c72bdd5b1e93fbd3abd893f1850505e7d10c568700acdd14c70c277661a760ade2395370e359b88514df0bd6bb7217f78e2222781cab2eecdf4917bff WHIRLPOOL 7eb6f0057fe00684dff84dee7562bf5e39a425e250af291b7a78faa860a3089698fe8fea214f9894f7906186d2348a0d6cca26c0078f84764010174f91eb224c
DIST mcrypt-2.6.8.tar.gz 471915 SHA256 5145aa844e54cca89ddab6fb7dd9e5952811d8d787c4f4bf27eb261e6c182098 SHA512 eae5f831e950df69eb93efc8314100b4b5dc8a535b1d00f500e6b25382efcec321346776a92dadf101b878ef46a47de2e9e81f5ddf5c73563ece4741f169c8d1 WHIRLPOOL f0853fd1d244de6310a4236fc0922a7d19e8c418b8d4b9cd0a66c4571843ffaf421dca7064c82ae0fde5f3aae4806fe27aa9dc05a705768f52a80586f941b538
EBUILD mcrypt-2.6.8-r1.ebuild 838 SHA256 338451edde89983166cc7cb613b313c92a11273161b0317f7da8166a1f7b0503 SHA512 ee5ca0a8a399608e59f1c3826ab9fadc7914cb165bbee9f87bb73b04029e75de73537d0b28c284178c5d49618b91d7c672c4bf47d587e780e778690ab9d70150 WHIRLPOOL 58f3d469578a6c7a25fb3739a0988dcc6fea27926722e81606fadbceda624946577a139b1862ceb44393552c3b49f5b0d9d7df59f96e4f195d0ee5a4404906bc
-MISC ChangeLog 4110 SHA256 11e61436a51446648a754f17ba9ae509d2347ef2b2cc8710b6bfcd2c82132492 SHA512 930dc634e149e03e076392a2786fa637dab0cdb703d01d6e9aa434f0dd2e9c55179498f0f7b2f7543cc3c0127f8d3bf2ee65c4593dea122fef9b05fdf6e1e408 WHIRLPOOL a6b585048e0035c38897e787c706708f10b9c6f77b388e043a4a50716c7486aad5721a64b0dccdd043ea82d8c19502bbaead32a730dbc07d95b5305e1d054a95
+EBUILD mcrypt-2.6.8-r2.ebuild 877 SHA256 641e78812cb528c70f014db00db73b1ff9f720d2909cae93349be6b621646ffe SHA512 8a00d1e7297c7735c9ca96ce1139eb5fe3c0581cc8e95a1b6c7f9ce9f897f2b01c0fbba1fad4389ce9bcfeef547e0601556bbd637539d7baa1948cbce38face5 WHIRLPOOL 9ff0efbaba451187aca916645556adaef0ba5e6eb851915fd96e859521866b006c95764ec33719e2d58bf38e2c69969da4c918246e660ee69f87f0b282a47a14
+MISC ChangeLog 4300 SHA256 bbb4307ffe4b5e4295ab9cdcbd55f0b2cfeddc5cc93b865281305605d12fc51c SHA512 54ddaac5f60dd00a185e9723e12850ece9cc7f0bcb9a1d036f95561cc33fb5538a29bb8b388b65874261d8eb2d5be80cb4b21a0394670ebcb56d13df22948b66 WHIRLPOOL dfa9fe7a0c27ed33dbde3ce07e2aa04a03a5d1928603732ac0cafbb2c21e5cd921d78ac8ed8348d8186b57a3df5d885f718557ae423edf2a14b8f75a36f7a724
MISC metadata.xml 278 SHA256 cdf12b5eab3aa2d9fc1e9fc4bb81ad42131e7d5e25483b7672a03fc3e486cda6 SHA512 176f10a7e71c131ae1360892e6caa9fdfcde541991e1e335e0db633ae3dc548ae18e5533ee1240eecfc237133f7e2839ceac094ba699e1d88490c1dedceccb20 WHIRLPOOL a2c01f8ae67af811103c9c5c2ff65f87b8c52bca1477423b1beeee95e9ee0ce88aed5544423eeda389c3b2974be441d54f8ace5fb50447ff37be078a52733312
diff --git a/app-crypt/mcrypt/files/mcrypt-2.6.8-segv.patch b/app-crypt/mcrypt/files/mcrypt-2.6.8-segv.patch
new file mode 100644
index 000000000000..478b3cbc0f6e
--- /dev/null
+++ b/app-crypt/mcrypt/files/mcrypt-2.6.8-segv.patch
@@ -0,0 +1,40 @@
+From 5bee29fae8f0e936ad4c957aef6035d09532a57a Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sat, 22 Dec 2012 22:04:27 +0200
+Subject: [PATCH] cleanup: fixup segv on buffer access
+
+use exact buffer size instead of guess.
+
+do not copy out of source buffer.
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ src/rfc2440.c | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/rfc2440.c b/src/rfc2440.c
+index 5a1f296..929b9ab 100644
+--- a/src/rfc2440.c
++++ b/src/rfc2440.c
+@@ -497,7 +497,7 @@ plaintext_encode(const USTRING dat)
+ time_t t;
+
+ assert(dat->len > 0);
+- result = make_ustring( NULL, 2 * dat->len); /* xxx */
++ result = make_ustring( NULL, dat->len + 12); /* xxx */
+ newdat = (USTRING)dat;
+ result->d[pos++] = (0x80 | 0x40 | PKT_PLAINTEXT);
+
+@@ -810,7 +810,8 @@ encrypted_encode(const USTRING pt, const DEK *dek)
+ _mcrypt_encrypt(dek->hd, rndpref, dek->blocklen + 2, NULL, 0);
+ _mcrypt_sync(dek->hd, rndpref, dek->blocklen);
+
+- ct = make_ustring( rndpref, 2 * pt->len); /* xxx */
++ ct = make_ustring( NULL, dek->blocklen + 2 + pt->len + 12); /* xxx */
++ memcpy(ct->d, rndpref, dek->blocklen + 2);
+ pos = dek->blocklen + 2;
+
+ _mcrypt_encrypt(dek->hd, ct->d + pos, pt->len, pt->d, pt->len);
+--
+1.7.8.6
+
diff --git a/app-crypt/mcrypt/mcrypt-2.6.8-r2.ebuild b/app-crypt/mcrypt/mcrypt-2.6.8-r2.ebuild
new file mode 100644
index 000000000000..532cfaf8781f
--- /dev/null
+++ b/app-crypt/mcrypt/mcrypt-2.6.8-r2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/mcrypt/mcrypt-2.6.8-r2.ebuild,v 1.1 2012/12/22 20:12:50 alonbl Exp $
+
+EAPI="2"
+
+inherit eutils
+
+DESCRIPTION="replacement of the old unix crypt(1)"
+HOMEPAGE="http://mcrypt.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mcrypt/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-macos"
+IUSE="nls"
+
+DEPEND=">=dev-libs/libmcrypt-2.5.8
+ >=app-crypt/mhash-0.9.9
+ sys-libs/zlib"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-2.6.7-qa.patch"
+ epatch "${FILESDIR}/${P}-stdlib.h.patch"
+ epatch "${FILESDIR}/${P}-segv.patch"
+}
+
+src_configure() {
+ econf $(use_enable nls)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS NEWS README THANKS TODO
+}