crypto-nettle: Fix use after free

pull/96/head
Andri Yngvason 2023-10-03 20:44:46 +00:00
parent 995d678e1e
commit 4be95d6938
1 changed files with 1 additions and 1 deletions

View File

@ -634,9 +634,9 @@ bool crypto_rsa_priv_key_load(struct crypto_rsa_priv_key* priv,
uint8_t* der = malloc(BASE64_DECODED_MAX_SIZE(base64_der.len));
assert(der);
vec_destroy(&base64_der);
ssize_t der_len = base64_decode(der, base64_der.data);
vec_destroy(&base64_der);
if (der_len < 0) {
free(der);
return false;