diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2009-04-12 21:46:02 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2009-04-12 21:46:02 +0000 |
commit | 3d8b8bb7b496e53c64e47d15a27c5e96e1682ff4 (patch) | |
tree | 1bce970868153f4c5304c8ff1334816ab8713c45 /app-crypt/mhash | |
parent | Change sqlite3 flag to sqlite; bug #251399 (diff) | |
download | gentoo-2-3d8b8bb7b496e53c64e47d15a27c5e96e1682ff4.tar.gz gentoo-2-3d8b8bb7b496e53c64e47d15a27c5e96e1682ff4.tar.bz2 gentoo-2-3d8b8bb7b496e53c64e47d15a27c5e96e1682ff4.zip |
Version bump. Bug #221093: Fix autotools defines. Bug #256800: obsolete dodoc txt. Bug #255131: segfault in snerfu and whirlpool. Bug #255006: memory leak.
(Portage version: 2.2_rc27/cvs/Linux x86_64)
Diffstat (limited to 'app-crypt/mhash')
-rw-r--r-- | app-crypt/mhash/ChangeLog | 15 | ||||
-rw-r--r-- | app-crypt/mhash/files/mhash-0.9.9-autotools-namespace-stomping.patch | 96 | ||||
-rw-r--r-- | app-crypt/mhash/files/mhash-0.9.9-fix-mem-leak.patch | 27 | ||||
-rw-r--r-- | app-crypt/mhash/files/mhash-0.9.9-fix-snefru-segfault.patch | 27 | ||||
-rw-r--r-- | app-crypt/mhash/files/mhash-0.9.9-fix-whirlpool-segfault.patch | 27 | ||||
-rw-r--r-- | app-crypt/mhash/mhash-0.9.9.9.ebuild | 47 |
6 files changed, 237 insertions, 2 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/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" +} |