From 4d912b49d182288ddb9155e0fd524b56ffc15078 Mon Sep 17 00:00:00 2001 From: shikokuchuo <53399081+shikokuchuo@users.noreply.github.com> Date: Tue, 25 Jun 2024 23:14:17 +0100 Subject: [PATCH] compact one --- src/base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/base.c b/src/base.c index 3b044cc..542e5d5 100644 --- a/src/base.c +++ b/src/base.c @@ -94,8 +94,7 @@ int mbedtls_base64_encode(unsigned char *dst, size_t dlen, size_t *olen, n = slen / 3 + (slen % 3 != 0); if (n > (SIZE_MAX - 1) / 4) { - *olen = SIZE_MAX; - return MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL; + *olen = SIZE_MAX; return MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL; } n *= 4;