mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-13 11:50:10 +01:00
Fix wiping of hash struct in nss and nettle backend.
This commit is contained in:
@@ -284,8 +284,7 @@ int crypt_hmac_init(struct crypt_hmac **ctx, const char *name,
|
|||||||
h = malloc(sizeof(*h));
|
h = malloc(sizeof(*h));
|
||||||
if (!h)
|
if (!h)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
memset(ctx, 0, sizeof(*ctx));
|
memset(h, 0, sizeof(*h));
|
||||||
|
|
||||||
|
|
||||||
h->hash = _get_alg(name);
|
h->hash = _get_alg(name);
|
||||||
if (!h->hash) {
|
if (!h->hash) {
|
||||||
|
|||||||
@@ -207,8 +207,7 @@ int crypt_hmac_init(struct crypt_hmac **ctx, const char *name,
|
|||||||
h = malloc(sizeof(*h));
|
h = malloc(sizeof(*h));
|
||||||
if (!h)
|
if (!h)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
memset(ctx, 0, sizeof(*ctx));
|
memset(h, 0, sizeof(*h));
|
||||||
|
|
||||||
|
|
||||||
h->hash = _get_alg(name);
|
h->hash = _get_alg(name);
|
||||||
if (!h->hash)
|
if (!h->hash)
|
||||||
|
|||||||
Reference in New Issue
Block a user