summaryrefslogtreecommitdiffstats
path: root/providers/implementations/kdfs/krb5kdf.c
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2021-11-30 11:52:10 +0100
committerTomas Mraz <tomas@openssl.org>2021-11-30 11:52:10 +0100
commitd2217c88df6e65c756013417e5ee4f470dd12470 (patch)
tree5202c1744a282bb5e6fc2e9b25557932951c1934 /providers/implementations/kdfs/krb5kdf.c
parent29a27cb2c5c1757831f42117871f8c59058343a9 (diff)
various kdfs: Always reset buflen after clearing the buffer
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17165)
Diffstat (limited to 'providers/implementations/kdfs/krb5kdf.c')
-rw-r--r--providers/implementations/kdfs/krb5kdf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/providers/implementations/kdfs/krb5kdf.c b/providers/implementations/kdfs/krb5kdf.c
index f8d4baa568..2c887f0eb9 100644
--- a/providers/implementations/kdfs/krb5kdf.c
+++ b/providers/implementations/kdfs/krb5kdf.c
@@ -98,6 +98,7 @@ static int krb5kdf_set_membuf(unsigned char **dst, size_t *dst_len,
{
OPENSSL_clear_free(*dst, *dst_len);
*dst = NULL;
+ *dst_len = 0;
return OSSL_PARAM_get_octet_string(p, (void **)dst, 0, dst_len);
}