summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-crypt/mhash/ChangeLog15
-rw-r--r--app-crypt/mhash/Manifest8
-rw-r--r--app-crypt/mhash/files/mhash-0.9.9-autotools-namespace-stomping.patch96
-rw-r--r--app-crypt/mhash/files/mhash-0.9.9-fix-mem-leak.patch27
-rw-r--r--app-crypt/mhash/files/mhash-0.9.9-fix-snefru-segfault.patch27
-rw-r--r--app-crypt/mhash/files/mhash-0.9.9-fix-whirlpool-segfault.patch27
-rw-r--r--app-crypt/mhash/mhash-0.9.9.9.ebuild47
7 files changed, 244 insertions, 3 deletions
diff --git a/app-crypt/mhash/ChangeLog b/app-crypt/mhash/ChangeLog
index b687379ace7b..1217ce4c0409 100644
--- a/app-crypt/mhash/ChangeLog
+++ b/app-crypt/mhash/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for app-crypt/mhash
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/mhash/ChangeLog,v 1.54 2008/06/08 21:38:23 the_paya Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/mhash/ChangeLog,v 1.55 2009/04/12 21:46:02 robbat2 Exp $
+
+*mhash-0.9.9.9 (12 Apr 2009)
+
+ 12 Apr 2009; Robin H. Johnson <robbat2@gentoo.org>
+ +files/mhash-0.9.9-autotools-namespace-stomping.patch,
+ +files/mhash-0.9.9-fix-mem-leak.patch,
+ +files/mhash-0.9.9-fix-snefru-segfault.patch,
+ +files/mhash-0.9.9-fix-whirlpool-segfault.patch, +mhash-0.9.9.9.ebuild:
+ Version bump. Bug #221093: Fix autotools defines. Bug #256800: obsolete
+ dodoc txt. Bug #255131: segfault in snerfu and whirlpool. Bug #255006:
+ memory leak.
08 Jun 2008; Javier Villavicencio <the_paya@gentoo.org>
mhash-0.9.9-r1.ebuild:
diff --git a/app-crypt/mhash/Manifest b/app-crypt/mhash/Manifest
index f8b8365ddf00..250307c0f331 100644
--- a/app-crypt/mhash/Manifest
+++ b/app-crypt/mhash/Manifest
@@ -1,6 +1,12 @@
+AUX mhash-0.9.9-autotools-namespace-stomping.patch 3087 RMD160 1dc4a66354c00a1ad1c044abde20068a3be18653 SHA1 f5d97658847c84763ccf1571ff98db80025e34e1 SHA256 42dba3baa4c1fe43104b026c3ad4903e6ba2ee043268336a3e84a7b66cb8fa0e
+AUX mhash-0.9.9-fix-mem-leak.patch 1016 RMD160 f4158a4a13eb1a68a5f88f92e1dff25fde573344 SHA1 37be6b1514744672c1e7207d81f51c05f3b275ea SHA256 87cd9ce4cda5f1fd18f629595f8d468b3600586207bf2b4c37c7091382cfb3c0
+AUX mhash-0.9.9-fix-snefru-segfault.patch 1005 RMD160 6f69ac227b8aa1100a91aa12cfd2b119c15708a5 SHA1 07d76a6b4c7916e004568881248d60e7e92ecaca SHA256 f35b6aed2c48fcf7cc43c40475786d0d583b0fd38cf3fa470f6c7d139d51864f
+AUX mhash-0.9.9-fix-whirlpool-segfault.patch 1011 RMD160 ed30c058bff58c977d45495c0fb13f57a9a0e60e SHA1 b5c68e6c104fd82f591c96c1f29e708874a662fc SHA256 cbf742203022b6a0ab64dd927c084ccfdc07da31ee5a180371b102dccf177795
AUX mhash-0.9.9-mutils-align.patch 2650 RMD160 fe4e9b8ec059e543c5bd2441d80a55eb528ef8a6 SHA1 4ef024457d8659b72a3a0cbed564bd3ec30437b8 SHA256 df3e872dd7cf42db77b9857619cd1c00710d1396c76c08b7e79ca7b53d54d123
+DIST mhash-0.9.9.9.tar.gz 931437 RMD160 846f3875bd5aba100ae64bbb6c658338ba1cdb79 SHA1 c898de5ea60d9e0873a1b73caa031bb1b5797c03 SHA256 3dcad09a63b6f1f634e64168dd398e9feb9925560f9b671ce52283a79604d13e
DIST mhash-0.9.9.tar.gz 919622 RMD160 8bca6a7bbfafb4098a829b60f7027c2de0fa0e10 SHA1 81fddd3b127232b3b3db8aea5b9154d64517c161 SHA256 a61d4f30f3377afd41e316e53f1d6a9a829f34d20add0e4bb29752cb01435c77
EBUILD mhash-0.9.9-r1.ebuild 1096 RMD160 6054ce091f43cb37a8004fe473e93cfc1806bb08 SHA1 ebcf5e0cc0995ff4e52611ae5b369c5b898152b2 SHA256 e24a50fafda9cc138d3013954e1349c2910375750a5cb5796b6c51149f12005e
+EBUILD mhash-0.9.9.9.ebuild 1349 RMD160 434c7bd443d92b10cd8b9c80f3885c7a934bc185 SHA1 761c77e3199ee5b70e13e4f98447b860e8f601c8 SHA256 f8e235adb2710d8ec2b7d52e0ca42d38febbce46f05aef2f630e3d41e9b0b5bc
EBUILD mhash-0.9.9.ebuild 958 RMD160 20a96bfaf39f5184bf4605bbca645d64a7fbf5df SHA1 3c72997df5417590a774b2c5448eb3e8e0bd2691 SHA256 a1a41a8f7e03e6559943a36227c931a329ef8ef4a8a03dccaab51710326a39c8
-MISC ChangeLog 6607 RMD160 128d76d52f894740fab0ad7977e6d514cd31401b SHA1 e6d71b4b85e2424d71b78cb0b1e0673f515a84ea SHA256 9488a1b6edc401750a0d193a340346bea4d7f466dfca3d14c05fd8f6b674417e
+MISC ChangeLog 7072 RMD160 bf38127b22a4f6415e5cc7102812f30703bcbffe SHA1 4c67e164fe81d9762407cfc5ebc32e4e3ec1f5a2 SHA256 95b4431e671862c439f463e04f008a08dc853894331e43fd8c518b6c3d1513c3
MISC metadata.xml 279 RMD160 f84566b5a463b59cc5ddd8a2210a54de9492ed2f SHA1 98caf044b8fce3f5ff202c7f7b71f0dcb9d51947 SHA256 785db7b7f8e4f9a526dc574ce2aa10024cc83af170f38ec9af9f56c23fc15543
diff --git a/app-crypt/mhash/files/mhash-0.9.9-autotools-namespace-stomping.patch b/app-crypt/mhash/files/mhash-0.9.9-autotools-namespace-stomping.patch
new file mode 100644
index 000000000000..19981b6b9072
--- /dev/null
+++ b/app-crypt/mhash/files/mhash-0.9.9-autotools-namespace-stomping.patch
@@ -0,0 +1,96 @@
+Per debian 473204: http://bugs.debian.org/473204, mhash exports #defines that
+are customarily autotools-private. This results in warnings when other packages
+attempt to use mhash's headers.
+
+Gentoo-Bug: 221093
+Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=221093
+Patch-URL: http://bugs.gentoo.org/attachment.cgi?id=152625&action=view
+Signed-off-by: Peter Alfredson <loki_val@gentoo.org>
+
+diff -NrU5 mhash-0.9.9.orig/configure.in mhash-0.9.9/configure.in
+--- mhash-0.9.9.orig/configure.in 2008-05-09 16:17:52.000000000 +0200
++++ mhash-0.9.9/configure.in 2008-05-09 16:18:20.000000000 +0200
+@@ -4,10 +4,11 @@
+ AC_CANONICAL_TARGET
+ AC_CONFIG_SRCDIR([lib/mhash.c])
+ AM_INIT_AUTOMAKE
+
+ AC_DEFINE([MHASH_VERSION], PROGRAM_VERSION, "MHash Version")
++AC_CONFIG_HEADER([include/mutils/config.h])
+ AC_CONFIG_HEADER([include/mutils/mhash_config.h])
+
+
+ dnl Check system.
+
+diff -NrU5 mhash-0.9.9.orig/include/mutils/config.h.in mhash-0.9.9/include/mutils/config.h.in
+--- mhash-0.9.9.orig/include/mutils/config.h.in 1970-01-01 01:00:00.000000000 +0100
++++ mhash-0.9.9/include/mutils/config.h.in 2008-05-09 16:18:20.000000000 +0200
+@@ -0,0 +1,22 @@
++/* Name of package */
++#undef PACKAGE
++
++/* Define to the address where bug reports for this package should be sent. */
++#undef PACKAGE_BUGREPORT
++
++/* Define to the full name of this package. */
++#undef PACKAGE_NAME
++
++/* Define to the full name and version of this package. */
++#undef PACKAGE_STRING
++
++/* Define to the one symbol short name of this package. */
++#undef PACKAGE_TARNAME
++
++/* Define to the version of this package. */
++#undef PACKAGE_VERSION
++
++/* Version number of package */
++#undef VERSION
++
++
+diff -NrU5 mhash-0.9.9.orig/include/mutils/mhash_config.h.in mhash-0.9.9/include/mutils/mhash_config.h.in
+--- mhash-0.9.9.orig/include/mutils/mhash_config.h.in 2008-05-09 16:17:52.000000000 +0200
++++ mhash-0.9.9/include/mutils/mhash_config.h.in 2008-05-09 16:19:17.000000000 +0200
+@@ -179,28 +179,10 @@
+ #undef MHASH_VERSION
+
+ /* Define to 1 if your C compiler doesn't accept -c and -o together. */
+ #undef NO_MINUS_C_MINUS_O
+
+-/* Name of package */
+-#undef PACKAGE
+-
+-/* Define to the address where bug reports for this package should be sent. */
+-#undef PACKAGE_BUGREPORT
+-
+-/* Define to the full name of this package. */
+-#undef PACKAGE_NAME
+-
+-/* Define to the full name and version of this package. */
+-#undef PACKAGE_STRING
+-
+-/* Define to the one symbol short name of this package. */
+-#undef PACKAGE_TARNAME
+-
+-/* Define to the version of this package. */
+-#undef PACKAGE_VERSION
+-
+ /* Define to 1 if the C compiler supports function prototypes. */
+ #undef PROTOTYPES
+
+ /* The size of `unsigned char', as computed by sizeof. */
+ #undef SIZEOF_UNSIGNED_CHAR
+@@ -221,13 +203,10 @@
+ #undef STDC_HEADERS
+
+ /* dmalloc */
+ #undef USE_DMALLOC
+
+-/* Version number of package */
+-#undef VERSION
+-
+ /* Define if using the dmalloc debugging malloc package */
+ #undef WITH_DMALLOC
+
+ /* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
diff --git a/app-crypt/mhash/files/mhash-0.9.9-fix-mem-leak.patch b/app-crypt/mhash/files/mhash-0.9.9-fix-mem-leak.patch
new file mode 100644
index 000000000000..74552499501f
--- /dev/null
+++ b/app-crypt/mhash/files/mhash-0.9.9-fix-mem-leak.patch
@@ -0,0 +1,27 @@
+The package app-crypt/mhash-0.9.9 as well as app-crypt/mhash-0.9.9-r1 are
+affected by a bug which causes memory to be leaked during
+mhash_restore_state_mem.
+
+In this function/patch, ret->state is allocated towards the beginning and later
+on replaced with a new allocated area without freeing the old. The patch fixes
+it.
+
+Patch already submitted upstream, but depending on speed, this may be faster to
+patch in a new patchset.
+
+Gentoo-Bug: 255006
+Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=255006
+Patch-URL: http://bugs.gentoo.org/attachment.cgi?id=178560
+Signed-off-by: Thomas Harning <harningt@gmail.com>
+
+--- mhash-0.9.9/lib/mhash.c 2007-02-21 01:18:46.000000000 -0500
++++ mhash-0.9.9-new/lib/mhash.c 2009-01-15 01:57:53.000000000 -0500
+@@ -719,6 +719,8 @@
+ mutils_memcpy( &ret->state_size, &mem[pos], sizeof(ret->state_size));
+ pos += sizeof( ret->state_size);
+
++ if (ret->state)
++ mutils_free(ret->state);
+ ret->state = mutils_malloc(ret->state_size);
+ if (ret->state==NULL)
+ goto freeall;
diff --git a/app-crypt/mhash/files/mhash-0.9.9-fix-snefru-segfault.patch b/app-crypt/mhash/files/mhash-0.9.9-fix-snefru-segfault.patch
new file mode 100644
index 000000000000..c308269c1b24
--- /dev/null
+++ b/app-crypt/mhash/files/mhash-0.9.9-fix-snefru-segfault.patch
@@ -0,0 +1,27 @@
+The package app-crypt/mhash-0.9.9 as well as app-crypt/mhash-0.9.9-r1 are
+affected by a bug which causes a NULL ptr dereference in whirlpool/snefru
+digest-completion functionality.
+
+In this patch, whirlpool and snefru's code is updated to bail if 'digest' is
+NULL. The code portion aborted is only responsible for writing data to the
+digest, so this appears to be correct behavior.
+
+Patch already submitted upstream, but depending on speed, this may be faster to
+patch in a new patchset.
+
+Gentoo-Bug: 255131
+Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=255131
+Patch-URL: http://bugs.gentoo.org/attachment.cgi?id=178666&action=view
+Signed-off-by: Thomas Harning <harningt@gmail.com>
+
+--- mhash-0.9.9/lib/snefru.c 2009-01-16 00:16:04.000000000 -0500
++++ mhash-0.9.9-new/lib/snefru.c 2009-01-16 00:16:21.000000000 -0500
+@@ -859,6 +859,8 @@
+ {
+ mutils_word32 i;
+
++ if(!digest) return;
++
+ for (i = 0; i < len; i++, digest += 4)
+ {
+ *(mutils_word32 *)digest = mutils_bend2sys32(ctx->hash[i]);
diff --git a/app-crypt/mhash/files/mhash-0.9.9-fix-whirlpool-segfault.patch b/app-crypt/mhash/files/mhash-0.9.9-fix-whirlpool-segfault.patch
new file mode 100644
index 000000000000..6c79139d5793
--- /dev/null
+++ b/app-crypt/mhash/files/mhash-0.9.9-fix-whirlpool-segfault.patch
@@ -0,0 +1,27 @@
+The package app-crypt/mhash-0.9.9 as well as app-crypt/mhash-0.9.9-r1 are
+affected by a bug which causes a NULL ptr dereference in whirlpool/snefru
+digest-completion functionality.
+
+In this patch, whirlpool and snefru's code is updated to bail if 'digest' is
+NULL. The code portion aborted is only responsible for writing data to the
+digest, so this appears to be correct behavior.
+
+Patch already submitted upstream, but depending on speed, this may be faster to
+patch in a new patchset.
+
+Gentoo-Bug: 255131
+Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=255131
+Patch-URL: http://bugs.gentoo.org/attachment.cgi?id=178667&action=view
+Signed-off-by: Thomas Harning <harningt@gmail.com>
+
+--- mhash-0.9.9/lib/whirlpool.c 2006-01-08 03:14:47.000000000 -0500
++++ mhash-0.9.9-new/lib/whirlpool.c 2009-01-16 00:17:34.000000000 -0500
+@@ -970,6 +970,8 @@
+ mutils_word8 * digest)
+ {
+ mutils_word32 i;
++
++ if(!digest) return;
+ /*
+ * return the completed message digest:
+ */
diff --git a/app-crypt/mhash/mhash-0.9.9.9.ebuild b/app-crypt/mhash/mhash-0.9.9.9.ebuild
new file mode 100644
index 000000000000..feae146d52fa
--- /dev/null
+++ b/app-crypt/mhash/mhash-0.9.9.9.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/mhash/mhash-0.9.9.9.ebuild,v 1.1 2009/04/12 21:46:02 robbat2 Exp $
+
+inherit eutils
+
+DESCRIPTION="library providing a uniform interface to a large number of hash algorithms"
+HOMEPAGE="http://mhash.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mhash/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Fix for issues in bug #181563
+ #epatch "${FILESDIR}/${PN}-0.9.9-mutils-align.patch"
+
+ epatch "${FILESDIR}"/${PN}-0.9.9-fix-mem-leak.patch
+ epatch "${FILESDIR}"/${PN}-0.9.9-fix-snefru-segfault.patch
+ epatch "${FILESDIR}"/${PN}-0.9.9-fix-whirlpool-segfault.patch
+ epatch "${FILESDIR}"/${PN}-0.9.9-autotools-namespace-stomping.patch
+}
+
+src_compile() {
+ econf \
+ --enable-static \
+ --enable-shared || die
+ emake || die "make failure"
+ cd doc && emake mhash.html || die "failed to build html"
+}
+
+src_install() {
+ dodir /usr/{bin,include,lib}
+ make install DESTDIR="${D}" || die "install failure"
+
+ dodoc AUTHORS INSTALL NEWS README TODO THANKS ChangeLog
+ dodoc doc/skid* doc/*.c
+ dohtml doc/mhash.html || die "dohtml failed"
+}