[packages/mhash] Fix hmac_test failure on i686/x86-32 by removing use-after-free.

arekm arekm at pld-linux.org
Mon Mar 9 19:37:30 CET 2026


commit 3f9c78d5d17f627d4f4564d0aeae1e40308664ba
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Mar 9 19:36:01 2026 +0100

    Fix hmac_test failure on i686/x86-32 by removing use-after-free.

 hmac-test-use-after-free.patch | 10 ++++++++++
 mhash.spec                     |  4 +++-
 2 files changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/mhash.spec b/mhash.spec
index 30d8f45..a922f79 100644
--- a/mhash.spec
+++ b/mhash.spec
@@ -7,13 +7,14 @@ Summary(pl.UTF-8):	Biblioteka funkcji mieszających (skrótu)
 Summary(pt_BR.UTF-8):	Interface uniforme para vários algoritmos hash
 Name:		mhash
 Version:	0.9.9.9
-Release:	7
+Release:	8
 License:	LGPL v2+
 Group:		Libraries
 Source0:	http://dl.sourceforge.net/mhash/%{name}-%{version}.tar.bz2
 # Source0-md5:	f91c74f9ccab2b574a98be5bc31eb280
 Patch0:		%{name}-shared.patch
 Patch1:		use-after-free.patch
+Patch2:		hmac-test-use-after-free.patch
 URL:		http://mhash.sourceforge.net/
 BuildRequires:	autoconf >= 2.59
 BuildRequires:	automake
@@ -84,6 +85,7 @@ biblioteca mhash.
 %setup -q
 %patch -P0 -p1
 %patch -P1 -p1
+%patch -P2 -p1
 
 %build
 %{__libtoolize}
diff --git a/hmac-test-use-after-free.patch b/hmac-test-use-after-free.patch
new file mode 100644
index 0000000..79b947d
--- /dev/null
+++ b/hmac-test-use-after-free.patch
@@ -0,0 +1,10 @@
+--- mhash-0.9.9.9/src/hmac_test.c.orig	2026-03-09 19:34:26.363023011 +0100
++++ mhash-0.9.9.9/src/hmac_test.c	2026-03-09 19:34:26.367436508 +0100
+@@ -76,7 +76,6 @@
+ 
+ 	/* Test No 2 */	
+ 	
+-	mutils_memset(tmp, 0, sizeof(tmp));
+ 	
+ 	passlen=sizeof(KEY2) - 1;
+ 	password = (mutils_word8 *) mutils_malloc(passlen+1);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mhash.git/commitdiff/3f9c78d5d17f627d4f4564d0aeae1e40308664ba



More information about the pld-cvs-commit mailing list