Hello community, here is the log from the commit of package mhash for openSUSE:Factory checked in at 2020-01-20 22:56:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mhash (Old) and /work/SRC/openSUSE:Factory/.mhash.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mhash" Mon Jan 20 22:56:02 2020 rev:25 rq:765879 version:0.9.9.9 Changes: -------- --- /work/SRC/openSUSE:Factory/mhash/mhash.changes 2015-03-01 14:46:50.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.mhash.new.26092/mhash.changes 2020-01-20 22:56:04.823358187 +0100 @@ -1,0 +2,10 @@ +Mon Jan 20 16:16:45 CET 2020 - [email protected] + +- add a few patches from the fedora package to tackle + a crash in the testsuite on 32bit + - add patch mhash-0.9.9.9-fix-snefru-segfault.patch + - add patch mhash-0.9.9.9-fix-whirlpool-segfault.patch + - add patch mhash-0.9.9.9-fix-mem-leak.patch + - add patch mhash-0.9.9-no-free-before-use.patch + +------------------------------------------------------------------- New: ---- mhash-0.9.9-no-free-before-use.patch mhash-0.9.9.9-fix-mem-leak.patch mhash-0.9.9.9-fix-snefru-segfault.patch mhash-0.9.9.9-fix-whirlpool-segfault.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mhash.spec ++++++ --- /var/tmp/diff_new_pack.AUbWM4/_old 2020-01-20 22:56:06.683358903 +0100 +++ /var/tmp/diff_new_pack.AUbWM4/_new 2020-01-20 22:56:06.687358904 +0100 @@ -1,7 +1,7 @@ # # spec file for package mhash # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -20,13 +20,17 @@ Version: 0.9.9.9 Release: 0 Summary: A Library for Working with Strong Hashes -License: GPL-2.0+ +License: GPL-2.0-or-later Group: Development/Libraries/C and C++ -Url: http://mhash.sourceforge.net/ +URL: http://mhash.sourceforge.net/ Source: http://sourceforge.net/projects/%{name}/files/%{name}/%{version}/%{name}-%{version}.tar.bz2 Patch0: %{name}-%{version}-shared.diff # PATCH-FIX-UPSTREAM fix-for-upstream-sources.patch sourceforge#2908478 Patch1: mhash_remove_premature_free.patch +Patch2: mhash-0.9.9.9-fix-snefru-segfault.patch +Patch3: mhash-0.9.9.9-fix-mem-leak.patch +Patch4: mhash-0.9.9.9-fix-whirlpool-segfault.patch +Patch5: mhash-0.9.9-no-free-before-use.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool @@ -60,6 +64,10 @@ %setup -q %patch0 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 %build autoreconf --force --install ++++++ mhash-0.9.9-no-free-before-use.patch ++++++ diff -up mhash-0.9.9.9/src/hmac_test.c.nofree mhash-0.9.9.9/src/hmac_test.c --- mhash-0.9.9.9/src/hmac_test.c.nofree 2019-07-29 14:44:55.856345469 -0400 +++ mhash-0.9.9.9/src/hmac_test.c 2019-07-29 14:45:11.466021935 -0400 @@ -72,7 +72,7 @@ int main() return(MUTILS_INVALID_RESULT); } - mutils_free(tmp); + /* mutils_free(tmp); */ /* Test No 2 */ ++++++ mhash-0.9.9.9-fix-mem-leak.patch ++++++ diff -up mhash-0.9.9.9/lib/mhash.c.BAD mhash-0.9.9.9/lib/mhash.c --- mhash-0.9.9.9/lib/mhash.c.BAD 2009-07-02 16:57:43.872049877 -0400 +++ mhash-0.9.9.9/lib/mhash.c 2009-07-02 16:58:03.909029777 -0400 @@ -719,6 +719,8 @@ WIN32DLL_DEFINE MHASH mhash_restore_stat 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; ++++++ mhash-0.9.9.9-fix-snefru-segfault.patch ++++++ diff -up mhash-0.9.9.9/lib/snefru.c.BAD mhash-0.9.9.9/lib/snefru.c --- mhash-0.9.9.9/lib/snefru.c.BAD 2009-07-02 16:54:58.973279449 -0400 +++ mhash-0.9.9.9/lib/snefru.c 2009-07-02 16:55:04.609279072 -0400 @@ -859,6 +859,8 @@ static void snefru_digest(__const struct { mutils_word32 i; + if(!digest) return; + for (i = 0; i < len; i++, digest += 4) { *(mutils_word32 *)digest = mutils_bend2sys32(ctx->hash[i]); ++++++ mhash-0.9.9.9-fix-whirlpool-segfault.patch ++++++ diff -up mhash-0.9.9.9/lib/whirlpool.c.BAD mhash-0.9.9.9/lib/whirlpool.c --- mhash-0.9.9.9/lib/whirlpool.c.BAD 2009-07-02 16:59:50.885279180 -0400 +++ mhash-0.9.9.9/lib/whirlpool.c 2009-07-02 17:00:12.189279257 -0400 @@ -970,6 +970,8 @@ void whirlpool_digest(__const struct whi mutils_word8 * digest) { mutils_word32 i; + + if(!digest) return; /* * return the completed message digest: */
