void-packages/srcpkgs/mhash/patches/fix-tests-use-after-free.patch

23 lines
560 B
Diff

--- a/src/hmac_test.c
+++ b/src/hmac_test.c
@@ -76,8 +76,6 @@ int main()
/* Test No 2 */
- mutils_memset(tmp, 0, sizeof(tmp));
-
passlen=sizeof(KEY2) - 1;
password = (mutils_word8 *) mutils_malloc(passlen+1);
mutils_memcpy(password, KEY2, passlen);
--- a/src/keygen_test.c
+++ b/src/keygen_test.c
@@ -121,8 +121,6 @@ int main()
mhash_keygen_ext(KEYGEN_S2K_SALTED, data, key, keysize, password, passlen);
- mutils_memset(tmp, 0, keysize * 2);
-
tmp = mutils_asciify(key, keysize);
result = mutils_strcmp((mutils_word8 *) KEY2, tmp);