From eebe04b181df8828a6edf6580708e3dd6fb5fabe Mon Sep 17 00:00:00 2001 From: Kareem Date: Tue, 20 Dec 2022 15:42:02 -0700 Subject: [PATCH] Fix length being passed into GetFormattedTime. --- wolfcrypt/src/asn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index aeca7dd49..e34b0c1d3 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -13861,7 +13861,7 @@ int GetAsnTimeString(void* currTime, byte* buf, word32 len) XMEMSET(uf_time, 0, sizeof(uf_time)); /* GetFormattedTime returns length with null terminator */ - data_len = GetFormattedTime(currTime, uf_time, len); + data_len = GetFormattedTime(currTime, uf_time, (word32)sizeof(uf_time)); if (data_len <= 0) { return ASN_TIME_E; }