forked from pool/libgcrypt
44e7a5642f
Fixed a few bugs. Enjoy! OBS-URL: https://build.opensuse.org/request/show/697283 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libgcrypt?expand=0&rev=124
40 lines
1.1 KiB
Diff
40 lines
1.1 KiB
Diff
Index: libgcrypt-1.8.4/src/hmac256.c
|
|
===================================================================
|
|
--- libgcrypt-1.8.4.orig/src/hmac256.c
|
|
+++ libgcrypt-1.8.4/src/hmac256.c
|
|
@@ -69,6 +69,7 @@ typedef uint32_t u32;
|
|
|
|
#ifdef STANDALONE
|
|
#define xtrymalloc(a) malloc((a))
|
|
+#define xfree(a) free((a))
|
|
#define gpg_err_set_errno(a) (errno = (a))
|
|
#else
|
|
#include "g10lib.h"
|
|
@@ -341,7 +342,7 @@ _gcry_hmac256_new (const void *key, size
|
|
tmphd = _gcry_hmac256_new (NULL, 0);
|
|
if (!tmphd)
|
|
{
|
|
- free (hd);
|
|
+ xfree (hd);
|
|
return NULL;
|
|
}
|
|
_gcry_hmac256_update (tmphd, key, keylen);
|
|
@@ -373,7 +374,7 @@ _gcry_hmac256_release (hmac256_context_t
|
|
/* Note: We need to take care not to modify errno. */
|
|
if (ctx->use_hmac)
|
|
my_wipememory (ctx->opad, 64);
|
|
- free (ctx);
|
|
+ xfree (ctx);
|
|
}
|
|
}
|
|
|
|
@@ -489,7 +490,7 @@ _gcry_hmac256_file (void *result, size_t
|
|
while ( (nread = fread (buffer, 1, buffer_size, fp)))
|
|
_gcry_hmac256_update (hd, buffer, nread);
|
|
|
|
- free (buffer);
|
|
+ xfree (buffer);
|
|
|
|
if (ferror (fp))
|
|
{
|