debian/0000775000000000000000000000000012230300413007154 5ustar debian/patches/0000775000000000000000000000000012230277515010623 5ustar debian/patches/0003-force64bit-tiger.patch0000664000000000000000000000130712227243003015273 0ustar From: "Barak A. Pearlmutter" Date: Mon, 24 Jun 2013 18:05:04 +0100 Subject: force64bit-tiger Via: git://pkgs.fedoraproject.org/mhash.git --- lib/tiger.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/tiger.c b/lib/tiger.c index 9834fc0..8f15df4 100644 --- a/lib/tiger.c +++ b/lib/tiger.c @@ -252,7 +252,9 @@ void tiger_update(struct tiger_ctx *ctx, mutils_word8 * buffer, mutils_word32 le void tiger_final(struct tiger_ctx *ctx) { register mutils_word64 i, j; - mutils_word8 temp[TIGER_DATASIZE]; + /* Force 64-bit alignment */ + mutils_word64 temp_64bit[TIGER_DATASIZE/8]; + mutils_word8 *temp = temp_64bit; i = ctx->index; #if defined(WORDS_BIGENDIAN) debian/patches/0004-fix-snefru-segfault.patch0000664000000000000000000000130512227243003016111 0ustar From: "Barak A. Pearlmutter" Date: Mon, 24 Jun 2013 18:05:04 +0100 Subject: fix-snefru-segfault Via: git://pkgs.fedoraproject.org/mhash.git Taken from Gentoo: http://mirror.its.uidaho.edu/pub/gentoo-portage/app-crypt/mhash/files/mhash-0.9.9-fix-snefru-segfault.patch --- lib/snefru.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/snefru.c b/lib/snefru.c index 6c10e22..7cfe745 100644 --- a/lib/snefru.c +++ b/lib/snefru.c @@ -859,6 +859,8 @@ static void snefru_digest(__const struct snefru_ctx *ctx, mutils_word8 *digest, { mutils_word32 i; + if(!digest) return; + for (i = 0; i < len; i++, digest += 4) { *(mutils_word32 *)digest = mutils_bend2sys32(ctx->hash[i]); debian/patches/0008-maxint.patch0000664000000000000000000000260512227243003013523 0ustar From: "Barak A. Pearlmutter" Date: Mon, 24 Jun 2013 18:05:04 +0100 Subject: maxint Via: git://pkgs.fedoraproject.org/mhash.git Taken from openpkg: http://www.mail-archive.com/openpkg-cvs@openpkg.org/msg26353.html --- lib/stdfns.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/stdfns.c b/lib/stdfns.c index d2132f6..79b9592 100644 --- a/lib/stdfns.c +++ b/lib/stdfns.c @@ -24,6 +24,7 @@ */ #include "libdefs.h" +#include /** * Some of these are wrappers. The idea is to eventually produce an extremely @@ -408,11 +409,11 @@ mutils_memcmp(__const void *s1, const void *s2, const mutils_word32 n) { return(0); } - return(-MAXINT); + return(-INT_MAX); } if (s2 == NULL) { - return(MAXINT); + return(INT_MAX); } return(memcmp(s1, s2, n)); @@ -539,11 +540,11 @@ mutils_strcmp(__const mutils_word8 *src1, const mutils_word8 *src2) { return(0); } - return(-MAXINT); + return(-INT_MAX); } if (src2 == NULL) { - return(MAXINT); + return(INT_MAX); } return(strcmp((char *) src1, (char *) src2)); } @@ -562,11 +563,11 @@ mutils_strncmp(__const mutils_word8 *src1, const mutils_word8 *src2, const mutil { return(0); } - return(-MAXINT); + return(-INT_MAX); } if (src2 == NULL) { - return(MAXINT); + return(INT_MAX); } return(strncmp((char *) src1, (char *) src2, n)); } debian/patches/0011-spelling.patch0000664000000000000000000000651512227243003014036 0ustar From: "Barak A. Pearlmutter" Date: Mon, 24 Jun 2013 23:44:43 +0100 Subject: spelling correct "seperately" to "separately" --- doc/mhash.3 | 4 ++-- doc/mhash.pod | 4 ++-- include/mutils/mutils.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/mhash.3 b/doc/mhash.3 index 79fdbf6..8b20a35 100644 --- a/doc/mhash.3 +++ b/doc/mhash.3 @@ -281,7 +281,7 @@ in bytes. Otherwise, it returns 0. .IP "char *\fBmhash_get_hash_name\fR(hashid \fItype\fR);" 4 .IX Item "char *mhash_get_hash_name(hashid type);" If \fItype\fR exists, this returns the name of the hash \fItype\fR. Otherwise, a -\&\f(CW\*(C`NULL\*(C'\fR pointer is returned. The string is allocated with \fImalloc\fR\|(3) seperately, +\&\f(CW\*(C`NULL\*(C'\fR pointer is returned. The string is allocated with \fImalloc\fR\|(3) separately, so do not forget to \fIfree\fR\|(3) it. .IP "const char *\fBmhash_get_hash_name_static\fR(hashid \fItype\fR);" 4 .IX Item "const char *mhash_get_hash_name_static(hashid type);" @@ -414,7 +414,7 @@ Algorithms are numbered from 0 to \f(CW\*(C`mhash_keygen_count()\*(C'\fR. .IP "char *\fBmhash_get_keygen_name\fR(keygenid \fItype\fR);" 4 .IX Item "char *mhash_get_keygen_name(keygenid type);" If \fItype\fR exists, this returns the name of the keygen \fItype\fR. Otherwise, a -\&\f(CW\*(C`NULL\*(C'\fR pointer is returned. The string is allocated with \fImalloc\fR\|(3) seperately, +\&\f(CW\*(C`NULL\*(C'\fR pointer is returned. The string is allocated with \fImalloc\fR\|(3) separately, so do not forget to \fIfree\fR\|(3) it. .IP "const char *\fBmhash_get_keygen_name_static\fR(keygenid \fItype\fR);" 4 .IX Item "const char *mhash_get_keygen_name_static(keygenid type);" diff --git a/doc/mhash.pod b/doc/mhash.pod index 6660c38..899ea12 100644 --- a/doc/mhash.pod +++ b/doc/mhash.pod @@ -146,7 +146,7 @@ in bytes. Otherwise, it returns 0. =item char *B(hashid I); If I exists, this returns the name of the hash I. Otherwise, a -C pointer is returned. The string is allocated with malloc(3) seperately, +C pointer is returned. The string is allocated with malloc(3) separately, so do not forget to free(3) it. =item const char *B(hashid I); @@ -303,7 +303,7 @@ Algorithms are numbered from 0 to C. =item char *B(keygenid I); If I exists, this returns the name of the keygen I. Otherwise, a -C pointer is returned. The string is allocated with malloc(3) seperately, +C pointer is returned. The string is allocated with malloc(3) separately, so do not forget to free(3) it. =item const char *B(keygenid I); diff --git a/include/mutils/mutils.h b/include/mutils/mutils.h index 2712a33..2b3872e 100644 --- a/include/mutils/mutils.h +++ b/include/mutils/mutils.h @@ -87,7 +87,7 @@ typedef unsigned char mutils_word8; /* * Due to buggy implementations of the boolean headers in some systems, - * we have to detect the boolean values seperately from the boolean type. + * we have to detect the boolean values separately from the boolean type. * A big thank you to Heiko Lehmann for spotting the bug. Unfortunately, * this fix may not be enough, as it is only going to work on things the * precompiler knows about. debian/patches/0007-autotools-namespace-stomping.patch0000664000000000000000000000514112230277515020052 0ustar From: "Barak A. Pearlmutter" Date: Mon, 24 Jun 2013 18:05:04 +0100 Subject: autotools-namespace-stomping Via: git://pkgs.fedoraproject.org/mhash.git Taken from Gentoo: http://mirror.its.uidaho.edu/pub/gentoo-portage/app-crypt/mhash/files/mhash-0.9.9-autotools-namespace-stomping.patch --- configure.in | 1 + include/mutils/config.h.in | 22 ++++++++++++++++++++++ include/mutils/mhash_config.h.in | 21 --------------------- 3 files changed, 23 insertions(+), 21 deletions(-) create mode 100644 include/mutils/config.h.in diff --git a/configure.in b/configure.in index 17836f9..a667d94 100644 --- a/configure.in +++ b/configure.in @@ -6,6 +6,7 @@ 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]) diff --git a/include/mutils/config.h.in b/include/mutils/config.h.in new file mode 100644 index 0000000..a8db4ac --- /dev/null +++ b/include/mutils/config.h.in @@ -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 --git a/include/mutils/mhash_config.h.in b/include/mutils/mhash_config.h.in index ed22aa5..9e039e6 100644 --- a/include/mutils/mhash_config.h.in +++ b/include/mutils/mhash_config.h.in @@ -181,24 +181,6 @@ /* 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 @@ -208,9 +190,6 @@ /* dmalloc */ #undef USE_DMALLOC -/* Version number of package */ -#undef VERSION - /* Define if using the dmalloc debugging malloc package */ #undef WITH_DMALLOC debian/patches/0013-autotools-updates.patch0000664000000000000000000000504612230277515015726 0ustar From: "Barak A. Pearlmutter" Date: Mon, 26 Aug 2013 23:51:06 +0100 Subject: autotools updates --- Makefile.am | 2 +- configure.in | 32 ++++++++++++++------------------ m4/DOORSTOP | 1 + 3 files changed, 16 insertions(+), 19 deletions(-) create mode 100644 m4/DOORSTOP diff --git a/Makefile.am b/Makefile.am index a8968a0..483c970 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -#AUTOMAKE_OPTIONS = foreign +ACLOCAL_AMFLAGS = -I m4 SUBDIRS = include lib doc src EXTRA_DIST = mhash.spec.in mhash.spec USE_MHASH_CONFIG = yes diff --git a/configure.in b/configure.in index f48aea8..d45aa54 100644 --- a/configure.in +++ b/configure.in @@ -1,9 +1,10 @@ dnl Process this file with autoconf to produce a configure script. -AC_PREREQ(2.59) -AC_INIT(MHASH, 0.9.9, mhash-devel@sourceforge.net) +AC_PREREQ([2.69]) +AC_INIT([MHASH],[0.9.9],[mhash-devel@sourceforge.net]) AC_CANONICAL_TARGET AC_CONFIG_SRCDIR([lib/mhash.c]) -AM_INIT_AUTOMAKE +AC_CONFIG_MACRO_DIR([m4]) +AM_INIT_AUTOMAKE([foreign -Wall]) AC_DEFINE([MHASH_VERSION], PROGRAM_VERSION, "MHash Version") AC_CONFIG_HEADER([include/mutils/config.h]) @@ -12,13 +13,9 @@ AC_CONFIG_HEADER([include/mutils/mhash_config.h]) dnl Check system. -AC_GNU_SOURCE +AC_USE_SYSTEM_EXTENSIONS -AC_AIX - -AC_ISC_POSIX - -AC_MINIX +AC_SEARCH_LIBS([strerror],[cposix]) dnl Checks for programs. @@ -29,6 +26,7 @@ AC_PROG_CXX AC_PROG_GCC_TRADITIONAL AC_PROG_INSTALL AC_PROG_LN_S +AM_PROG_AR dnl Check Make characteristics AC_PROG_MAKE_SET @@ -44,11 +42,9 @@ AC_C_BIGENDIAN dnl Miscellaneous checks -AC_CONST - -AC_LIBTOOL_WIN32_DLL +AC_C_CONST -AM_PROG_LIBTOOL +LT_INIT([win32-dll]) AC_TYPE_SIZE_T @@ -57,11 +53,11 @@ dnl Checks for headers AC_HEADER_STDBOOL AC_HEADER_STDC -AC_CHECK_HEADERS(sys/endian.h sys/stat.h sys/types.h sys/mman.h) -AC_CHECK_HEADERS(assert.h byteswap.h dlfcn.h ctype.h errno.h) -AC_CHECK_HEADERS(endian.h fcntl.h inttypes.h limits.h) -AC_CHECK_HEADERS(malloc.h unistd.h utime.h values.h) -AC_CHECK_HEADERS(signal.h stdint.h stdio.h stdlib.h string.h strings.h) +AC_CHECK_HEADERS([sys/endian.h sys/stat.h sys/types.h sys/mman.h]) +AC_CHECK_HEADERS([assert.h byteswap.h dlfcn.h ctype.h errno.h]) +AC_CHECK_HEADERS([endian.h fcntl.h inttypes.h limits.h]) +AC_CHECK_HEADERS([malloc.h unistd.h utime.h values.h]) +AC_CHECK_HEADERS([signal.h stdint.h stdio.h stdlib.h string.h strings.h]) dnl Checks for functions diff --git a/m4/DOORSTOP b/m4/DOORSTOP new file mode 100644 index 0000000..1721617 --- /dev/null +++ b/m4/DOORSTOP @@ -0,0 +1 @@ +hold it open debian/patches/0012-autoconf-toe-step.patch0000664000000000000000000000331012230277515015575 0ustar From: "Barak A. Pearlmutter" Date: Thu, 5 Sep 2013 01:19:12 +0100 Subject: autoconf toe step Stop stepping on the toes of standard autotools variables: remove special-case code to recognize and set variables that work fine, or have standard variables with different names that work fine by default. --- configure.in | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/configure.in b/configure.in index a667d94..f48aea8 100644 --- a/configure.in +++ b/configure.in @@ -88,46 +88,6 @@ AC_CHECK_SIZEOF(unsigned char, 1) dnl Checks for optional libraries and tools AM_WITH_DMALLOC -AM_MAINTAINER_MODE - -AC_ARG_WITH(CC, -[ --with-CC choose compiler], - if test "$withval" != "no" && test "$withval" != "yes" ; then - CC="$withval" - fi -) - -AC_ARG_WITH(CFLAGS, -[ --with-CFLAGS set C compiler flags], - if test "$withval" != "no" && test "$withval" != "yes" ; then - CFLAGS="$withval" - fi -) - -AC_ARG_WITH(CPPFLAGS, -[ --with-CPPFLAGS set C preprocessor flags], - if test "$withval" != "no" && test "$withval" != "yes" ; then - CPPFLAGS="$withval" - fi -) - -AC_ARG_WITH(LDFLAGS, -[ --with-LDFLAGS set linker flags], - if test "$withval" != "no" && test "$withval" != "yes" ; then - LDFLAGS="$withval" - fi -) - -if test x$ac_cv_prog_gcc = xyes; then - if test x$opt_maintainer_mode = xyes; then - CFLAGS=" -ggdb3 -O2 -Wall -Wpointer-arith" - fi - - if test x$opt_dmalloc_mode = xyes; then - AC_CHECK_LIB( dmalloc, main) - AC_DEFINE(USE_DMALLOC, 1, [dmalloc]) - fi -fi AC_ARG_ENABLE(md5, [ --disable-md5 disable the MD5 algorithm], debian/patches/0010-keygen_test_fix.patch0000664000000000000000000000130612227243003015400 0ustar From: "Barak A. Pearlmutter" Date: Mon, 24 Jun 2013 11:17:29 +0100 Subject: keygen_test_fix due to Tom Callaway at fedora, http://pkgs.fedoraproject.org/cgit/mhash.git/tree/mhash-0.9.9.9-keygen_test_fix.patch see http://bugs.debian.org/649092 --- src/keygen_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keygen_test.c b/src/keygen_test.c index 62b97bc..9b934fa 100644 --- a/src/keygen_test.c +++ b/src/keygen_test.c @@ -121,7 +121,7 @@ int main() mhash_keygen_ext(KEYGEN_S2K_SALTED, data, key, keysize, password, passlen); - mutils_memset(tmp, 0, keysize * 2); + // mutils_memset(tmp, 0, keysize * 2); tmp = mutils_asciify(key, keysize); debian/patches/0009-alignment.patch0000664000000000000000000000145012227243003014177 0ustar From: "Barak A. Pearlmutter" Date: Mon, 24 Jun 2013 18:05:04 +0100 Subject: alignment Via: git://pkgs.fedoraproject.org/mhash.git Taken from openpkg: http://www.mail-archive.com/openpkg-cvs@openpkg.org/msg26353.html --- lib/stdfns.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/stdfns.c b/lib/stdfns.c index 79b9592..ab60107 100644 --- a/lib/stdfns.c +++ b/lib/stdfns.c @@ -378,6 +378,12 @@ mutils_memmove(void *dest, __const void *src, const mutils_word32 n) bigptr1 = (mutils_word32 *) dest; bigptr2 = (mutils_word32 *) src; + /* copy byte-by-byte for small and/or unaligned copies */ + if ((n < 16) || ((mutils_word32)dest & 0x3) || ((mutils_word32)src & 0x3)) + { + return mutils_memcpy8(dest, src, n); + } + words = n >> 2; remainder = n - (words << 2); debian/patches/series0000664000000000000000000000054212230277515012041 0ustar 0001-char-mhash_get_hash_name.patch 0002-align.patch 0003-force64bit-tiger.patch 0004-fix-snefru-segfault.patch 0005-fix-mem-leak.patch 0006-fix-whirlpool-segfault.patch 0007-autotools-namespace-stomping.patch 0008-maxint.patch 0009-alignment.patch 0010-keygen_test_fix.patch 0011-spelling.patch 0012-autoconf-toe-step.patch 0013-autotools-updates.patch debian/patches/0002-align.patch0000664000000000000000000000645112227243003013312 0ustar From: "Barak A. Pearlmutter" Date: Mon, 24 Jun 2013 18:05:04 +0100 Subject: align Via: git://pkgs.fedoraproject.org/mhash.git --- lib/stdfns.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 60 insertions(+), 12 deletions(-) diff --git a/lib/stdfns.c b/lib/stdfns.c index 907393c..d2132f6 100644 --- a/lib/stdfns.c +++ b/lib/stdfns.c @@ -152,6 +152,18 @@ mutils_bzero(void *s, __const mutils_word32 n) } } +static void +mutils_memset8(void *s, __const mutils_word8 c, __const mutils_word32 n) +{ + mutils_word8 *stmp = s; + mutils_word32 i; + + for (i = 0; i < n; i++, stmp++) + { + *stmp = c; + } +} + WIN32DLL_DEFINE void mutils_memset(void *s, __const mutils_word8 c, __const mutils_word32 n) @@ -160,8 +172,7 @@ mutils_memset(void *s, __const mutils_word8 c, __const mutils_word32 n) /* Sparc needs 8-bit alignment - just use standard memset */ memset(s, (int) c, (size_t) n); #else - mutils_word8 *stmp; - mutils_word32 *ltmp = (mutils_word32 *) s; + mutils_word32 *ltmp; mutils_word32 lump; mutils_word32 i; mutils_word32 words; @@ -172,22 +183,30 @@ mutils_memset(void *s, __const mutils_word8 c, __const mutils_word32 n) return; } + if (n < 16) + { + return mutils_memset8(s, c, n); + } + + /* unaligned portion at beginning */ + remainder = (-(mutils_word32)s) & 0x3; + mutils_memset8(s, c, remainder); + + /* aligned words in the middle */ + ltmp = (mutils_word32 *) (s + remainder); + lump = (c << 24) + (c << 16) + (c << 8) + c; - words = n >> 2; - remainder = n - (words << 2); + words = (n - remainder) >> 2; + remainder = n - remainder - (words << 2); for (i = 0; i < words; i++, ltmp++) { *ltmp = lump; } - stmp = (mutils_word8 *) ltmp; - - for (i = 0; i < remainder; i++, stmp++) - { - *stmp = c; - } + /* unaligned portion at end */ + return mutils_memset8(ltmp, c, remainder); #endif } @@ -281,6 +300,9 @@ mutils_word32nswap(mutils_word32 *x, mutils_word32 n, mutils_boolean destructive mutils_word32 *buffer; mutils_word32 *ptrIn; mutils_word32 *ptrOut; + mutils_word8 *ptr8In; + mutils_word8 *ptr8Out; + mutils_word8 tmp8; mutils_word32 count = n * 4; if (destructive == MUTILS_FALSE) @@ -301,9 +323,35 @@ mutils_word32nswap(mutils_word32 *x, mutils_word32 n, mutils_boolean destructive * data on a little-endian machine. */ - for (loop = 0, ptrIn = x, ptrOut = buffer; loop < n; loop++, ptrOut++, ptrIn++) + if ((mutils_word32)x & 0x3) + { + ptr8In = (mutils_word8 *) x; + ptr8Out = (mutils_word8 *) buffer; + for (loop = 0; loop < n; loop++) + { +#ifdef WORDS_BIGENDIAN + tmp8 = ptr8In[0]; + ptr8Out[0] = ptr8In[3]; + ptr8Out[3] = tmp8; + tmp8 = ptr8In[1]; + ptr8Out[1] = ptr8In[2]; + ptr8Out[2] = tmp8; +#else + ptr8Out[0] = ptr8In[0]; + ptr8Out[1] = ptr8In[1]; + ptr8Out[2] = ptr8In[2]; + ptr8Out[3] = ptr8In[3]; +#endif + ptr8Out += 4; + ptr8In += 4; + } + } + else { - *ptrOut = mutils_lend32(*ptrIn); + for (loop = 0, ptrIn = x, ptrOut = buffer; loop < n; loop++, ptrOut++, ptrIn++) + { + *ptrOut = mutils_lend32(*ptrIn); + } } return(buffer); debian/patches/0006-fix-whirlpool-segfault.patch0000664000000000000000000000130412227243003016627 0ustar From: "Barak A. Pearlmutter" Date: Mon, 24 Jun 2013 18:05:04 +0100 Subject: fix-whirlpool-segfault Via: git://pkgs.fedoraproject.org/mhash.git Taken from Gentoo: http://mirror.its.uidaho.edu/pub/gentoo-portage/app-crypt/mhash/files/mhash-0.9.9-fix-whirlpool-segfault.patch --- lib/whirlpool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/whirlpool.c b/lib/whirlpool.c index 36e36df..4d5e138 100644 --- a/lib/whirlpool.c +++ b/lib/whirlpool.c @@ -970,6 +970,8 @@ void whirlpool_digest(__const struct whirlpool_ctx * ctx, mutils_word8 * digest) { mutils_word32 i; + + if(!digest) return; /* * return the completed message digest: */ debian/patches/0005-fix-mem-leak.patch0000664000000000000000000000136312227243003014474 0ustar From: "Barak A. Pearlmutter" Date: Mon, 24 Jun 2013 18:05:04 +0100 Subject: fix-mem-leak Via: git://pkgs.fedoraproject.org/mhash.git Taken from Gentoo: http://mirror.its.uidaho.edu/pub/gentoo-portage/app-crypt/mhash/files/mhash-0.9.9-fix-mem-leak.patch --- lib/mhash.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/mhash.c b/lib/mhash.c index fd637b9..645ff9f 100644 --- a/lib/mhash.c +++ b/lib/mhash.c @@ -719,6 +719,8 @@ WIN32DLL_DEFINE MHASH mhash_restore_state_mem(void* _mem) 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; debian/patches/0001-char-mhash_get_hash_name.patch0000664000000000000000000000143612227243003017072 0ustar From: Chris Hanson Date: Wed, 2 Dec 2009 11:22:04 +0000 Subject: char mhash_get_hash_name Change return type in prototype of mhash_get_hash_name from mutils_word8* to char*. See http://bugs.debian.org/354206 --- include/mutils/mhash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mutils/mhash.h b/include/mutils/mhash.h index 469c149..fbddc45 100644 --- a/include/mutils/mhash.h +++ b/include/mutils/mhash.h @@ -55,7 +55,7 @@ typedef struct mhash_hash_entry mhash_hash_entry; mutils_word32 mhash_count(void); mutils_word32 mhash_get_block_size(hashid type); -mutils_word8 *mhash_get_hash_name(hashid type); +char *mhash_get_hash_name(hashid type); void mhash_free(void *ptr); __const mutils_word8 *mhash_get_hash_name_static(hashid type); debian/source/0000775000000000000000000000000012206754103010470 5ustar debian/source/format0000664000000000000000000000001412206754103011676 0ustar 3.0 (quilt) debian/control0000664000000000000000000000327112230277515010602 0ustar Source: mhash Section: libs Priority: optional Maintainer: Chris Hanson Uploaders: Barak A. Pearlmutter Build-Depends: debhelper (>= 9), dh-autoreconf Standards-Version: 3.9.4 Homepage: http://mhash.sourceforge.net/ Vcs-Git: git://anonscm.debian.org/collab-maint/mhash.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/mhash.git Package: libmhash2 Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Description: Library for cryptographic hashing and message authentication Mhash is a library that provides a uniform interface to a large number of hash algorithms. These algorithms can be used to compute checksums, message digests, and other signatures. The HMAC support implements the basics for message authentication, following RFC 2104. Mhash also provides several key-generation algorithms, including those of OpenPGP (RFC 2440). . This package contains the shared library. Package: libmhash-dev Section: libdevel Architecture: any Depends: libmhash2 (= ${binary:Version}), libc6-dev, ${misc:Depends} Description: Library for cryptographic hashing and message authentication Mhash is a library that provides a uniform interface to a large number of hash algorithms. These algorithms can be used to compute checksums, message digests, and other signatures. The HMAC support implements the basics for message authentication, following RFC 2104. Mhash also provides several key-generation algorithms, including those of OpenPGP (RFC 2440). Further information is available at http://mhash.sourceforge.net/. . This package contains header files, the man page, and the static library. debian/libmhash-dev.manpages0000664000000000000000000000001412206754103013243 0ustar doc/mhash.3 debian/changelog0000664000000000000000000002355212230277515011055 0ustar mhash (0.9.9.9-4) unstable; urgency=low * disable multi-arch for -dev package (closes: #723667) * minor autotools patches -- Barak A. Pearlmutter Fri, 18 Oct 2013 19:33:51 +0100 mhash (0.9.9.9-3) unstable; urgency=low * turn on multi-arch: same to allow co-existence * stop using dh-exec (see http://wiki.debian.org/Multiarch/Implementation) -- Barak A. Pearlmutter Tue, 25 Jun 2013 14:13:58 +0100 mhash (0.9.9.9-2) unstable; urgency=low * debian/control: - add VCS field (collab-maint git repo) - add homepage field - bump standards version - add self as co-maintainer * Move to dh9, update packaging scripts accordingly * Use dh-autoreconf * Support multiarch using dh-exec * Switch to dpkg source format 3.0 (quilt) * Incorporate Fedora patches (closes: #649092) * Patch a spelling error -- Barak A. Pearlmutter Tue, 25 Jun 2013 09:43:43 +0100 mhash (0.9.9.9-1.1) unstable; urgency=low * NMU * lib/{whirlpool,snefru}.c: Fix mhash_deinit segfaults when digest is NULL -- Chow Loong Jin Mon, 09 Jan 2012 20:32:32 +0800 mhash (0.9.9.9-1) unstable; urgency=low * New upstream version. * include/mutils/mhash_config.h.in: Remove PACKAGE_ variables from include file. (closes: Bug#473204) * include/mutils/mhash.h: Manually patch mhash_get_hash_name to return "char *". (closes: Bug#354206) * debian/control: Bump standards-version to 3.8.3 (no changes). * Remove unused maintainer scripts. * debian/control, debian/compat: Use debhelper version 5. -- Chris Hanson Wed, 02 Dec 2009 02:56:36 -0800 mhash (0.9.9-1) unstable; urgency=low * New upstream version. - No longer contains non-free RFCs. (closes: Bug#393398) * debian/rules: eliminate lintian warning debian-rules-ignores-make-clean-error. * debian/control: eliminate lintial error not-binnmuable-any-depends-any. -- Chris Hanson Sat, 21 Jul 2007 22:15:39 -0400 mhash (0.9.7.dfsg-1.1) unstable; urgency=low * Non-maintainer upload. * Pruning rfc's from the source package (Closes: 393398). -- Pierre Habouzit Sat, 21 Jul 2007 15:19:31 +0200 mhash (0.9.7-1) unstable; urgency=low * New upstream version. -- Chris Hanson Sun, 25 Jun 2006 21:49:23 -0400 mhash (0.9.6-3) unstable; urgency=low * Fix VERSION problem by renaming that variable to MHASH_VERSION. (closes: Bug#356490) -- Chris Hanson Wed, 31 May 2006 14:55:40 -0400 mhash (0.9.6-2) unstable; urgency=low * Attempt to fix #350088. This patch looks correct when compared to version 0.9.1, so please test and report back to BTS. * debian/rules: Define MHASH_ROBUST when making package; this should convert segfaults (e.g. from #350088) into errors. * Considerably complicate patch to in order to fix problems caused by previous patch. * Patch upstream typos in several files. * Bump standards-version to 3.7.2 (no changes). -- Chris Hanson Sun, 14 May 2006 01:03:43 -0400 mhash (0.9.6-1) unstable; urgency=low * New upstream version. The last release opened several bugs (348604 354206 350088) against this package, which remain open upstream. Please test and report the results back to BTS, as upstream needs to hear from us. (Thanks to Marc Haber for forwarding the bug reports upstream -- I've been swamped with work and am having trouble keeping up.) * Patch to work around problem with VERSION. Fixes #356490, but the bug remains open. I will reduce its severity until it is fixed upstream. -- Chris Hanson Tue, 21 Mar 2006 00:32:06 -0500 mhash (0.9.4a-1) unstable; urgency=low * New upstream version. (closes: Bug#342678) * patch upstream version: restore missing include file. * debian/copyright: update FSF address. * debian/control: bump standards-version (no changes). * debian/libmhash-dev.files: make sure all include files are moved. -- Chris Hanson Fri, 13 Jan 2006 23:24:34 -0500 mhash (0.9.1-1) unstable; urgency=low * New upstream version. (closes: Bug#263093) * Don't rebuild autoconf files to get static libraries. Just pass args to configure script. -- Chris Hanson Tue, 30 Nov 2004 00:25:59 -0500 mhash (0.8.18-4) unstable; urgency=low * Bump version to work around failed upload. -- Chris Hanson Tue, 16 Dec 2003 14:29:11 -0500 mhash (0.8.18-2) unstable; urgency=low * Put libmhash.a back. (closes: Bug#221797, Bug#222826) -- Chris Hanson Tue, 16 Dec 2003 12:54:36 -0500 mhash (0.8.18-1) unstable; urgency=low * New upstream version. (Well, not so new really.) * Remove libmhash.a since it is no longer built by upstream. * Standards version 3.6.1 (no changes). -- Chris Hanson Fri, 31 Oct 2003 23:37:39 -0500 mhash (0.8.17-1) unstable; urgency=low * New upstream version. * Eliminate reference to dh_undocumented. * Use dh_installman rather than dh_installmanpages. * Add ${misc:Depends} reference. * Change section of libapm-dev to libdevel. * Eliminate unneeded local variables in debian/changelog. * Add support for "noopt" in DEB_BUILD_OPTIONS. * Change standards version to 3.5.9. * Update debian/rules according to latest advice from autotools-dev. -- Chris Hanson Tue, 1 Apr 2003 23:48:37 -0500 mhash (0.8.16-1) unstable; urgency=low * New upstream version. -- Chris Hanson Thu, 30 May 2002 16:37:07 -0400 mhash (0.8.14-1) unstable; urgency=low * New upstream version. -- Chris Hanson Fri, 29 Mar 2002 11:24:22 -0500 mhash (0.8.13-1) unstable; urgency=low * New upstream version. -- Chris Hanson Sun, 18 Nov 2001 23:27:05 -0500 mhash (0.8.12-1) unstable; urgency=low * New upstream version. -- Chris Hanson Sun, 28 Oct 2001 23:36:30 -0500 mhash (0.8.11-3) unstable; urgency=low * Fix upstream problems that caused SIGSEGV to be signalled when mhash_get_hash_name() and mhash_get_keygen_name() were called with invalid type arguments. -- Chris Hanson Thu, 25 Oct 2001 23:01:44 -0400 mhash (0.8.11-2) unstable; urgency=medium * Fix upstream compilation bug that required libmhash-dev to be installed before compilation could succeed. The changes were recommended by the upstream maintainer and will be incorporated in the next release. (closes: Bug#116794) -- Chris Hanson Tue, 23 Oct 2001 15:01:07 -0400 mhash (0.8.11-1) unstable; urgency=low * New upstream version. * Add some changes recommended by the autotools-dev package. -- Chris Hanson Mon, 22 Oct 2001 00:51:22 -0400 mhash (0.8.10-2) unstable; urgency=low * Eliminate lintian warnings related to calling ldconfig in postinst and postrm for libmhash2. * Update standards-version to 3.5.6. -- Chris Hanson Thu, 4 Oct 2001 15:35:15 -0400 mhash (0.8.10-1) unstable; urgency=low * New upstream version. -- Chris Hanson Tue, 17 Jul 2001 11:29:10 -0400 mhash (0.8.9-3) unstable; urgency=low * Add build dependency on autotools-dev and refer to up-to-date during the configuration stage. (closes: Bug#101211) * Update to standards-version 3.5.5. -- Chris Hanson Sun, 17 Jun 2001 20:38:16 -0400 mhash (0.8.9-2) unstable; urgency=low * Updated to standards-version 3.5.2. * Eliminate uses of dh_testversion and dh_suidregister. -- Chris Hanson Fri, 23 Mar 2001 22:27:36 -0500 mhash (0.8.9-1) unstable; urgency=low * New upstream version. -- Chris Hanson Mon, 5 Feb 2001 23:28:53 -0500 mhash (0.8.8-2) unstable; urgency=low * Fix upstream thinko that caused compilation error on alpha. (closes: Bug#84378) -- Chris Hanson Thu, 1 Feb 2001 12:18:48 -0500 mhash (0.8.8-1) unstable; urgency=low * New upstream version. -- Chris Hanson Mon, 29 Jan 2001 14:13:26 -0500 mhash (0.8.6-2) unstable; urgency=low * Change definitions of byteReverse in "lib/md4.c" and "lib/md5.c" to be static, so they don't interfere with one another at link time. (closes: Bug#83843) -- Chris Hanson Sun, 28 Jan 2001 11:48:21 -0500 mhash (0.8.6-1) unstable; urgency=low * New upstream release. -- Chris Hanson Sat, 27 Jan 2001 01:13:03 -0500 mhash (0.8.5-1) unstable; urgency=medium * New upstream version. * Improved package descriptions. (closes: Bug#67878, Bug#74757) * Flesh out {pre,post}{inst,rm} scripts for each package so that debhelper has somewhere to insert script fragments. -- Chris Hanson Sat, 20 Jan 2001 00:34:56 -0500 mhash (0.8.2-2) unstable; urgency=low * New maintainer. (closes: Bug#68234) -- Chris Hanson Fri, 19 Jan 2001 21:04:10 -0500 mhash (0.8.2-1) unstable; urgency=low * New upstream version -- Gergely Madarasz Fri, 12 May 2000 20:24:02 +0200 mhash (0.8.1-1) unstable; urgency=low * New upstream version * New soname -> new package name * Update copyright file (now LGPL) -- Gergely Madarasz Sun, 16 Apr 2000 02:46:02 +0200 mhash (0.6.1-1) unstable; urgency=low * New upstream version -- Gergely Madarasz Thu, 2 Dec 1999 15:49:39 +0100 mhash (0.5.2-3) unstable; urgency=low * FHS compliance * Standards: 3.0.1 * Change maintainer address -- Gergely Madarasz Tue, 7 Sep 1999 19:26:19 +0200 mhash (0.5.2-2) unstable; urgency=low * Fix maintainer address in control file -- Gergely Madarasz Wed, 14 Jul 1999 23:55:09 +0200 mhash (0.5.2-1) unstable; urgency=low * Initial Release. -- Gergely Madarasz Wed, 14 Jul 1999 11:35:02 +1000 debian/libmhash2.docs0000664000000000000000000000002412206754103011707 0ustar AUTHORS TODO README debian/copyright0000664000000000000000000000243612227242666011141 0ustar This package was debianized by Gergely Madarasz on Wed, 7 Jul 1999 14:47:59 +0200. It was downloaded from http://mhash.sourceforge.net/ The current (as of Oct 2013) upstream development repository is git://git.code.sf.net/p/mhash/code Upstream Authors: Nikos Mavroyanopoulos Sascha Schumann Copyright: Copyright (C) 2000,2001 Nikos Mavroyanopoulos This package is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. On Debian GNU/Linux systems, the complete text of the GNU Lesser General Public License can be found in `/usr/share/common-licenses/LGPL-2'. debian/libmhash2.install0000664000000000000000000000002412206754103012425 0ustar usr/lib/*/lib*.so.* debian/compat0000664000000000000000000000000212206754103010366 0ustar 9 debian/libmhash-dev.install0000664000000000000000000000005712206754103013125 0ustar usr/include usr/lib/*/lib*.a usr/lib/*/lib*.so debian/rules0000775000000000000000000000023112206754103010244 0ustar #!/usr/bin/make -f %: dh $@ --parallel --with autoreconf export CPPFLAGS += -DMHASH_ROBUST override_dh_installchangelogs: dh_installchangelogs NEWS debian/watch0000664000000000000000000000044612206754103010225 0ustar version=3 opts=dversionmangle=s/\+dfsg\d*$//,uversionmangle=s/_/./g;s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|b|a)[\-\.]?\d*)$/$1~$2/ \ http://qa.debian.org/watch/sf.php/mhash/mhash-(\d.*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz)) # Bart Martens Sun, 06 Jan 2013 21:11:46 +0000