From 0d370ecbfe24b7a1dcecf4d5076b230eb2c2f34f Mon Sep 17 00:00:00 2001 From: Henrik Holst Date: Tue, 1 Feb 2022 13:39:06 +0100 Subject: [PATCH] base64: remove an unnecessary call to strlen Closes #8369 --- lib/base64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/base64.c b/lib/base64.c index be6f163dc4..527e29955a 100644 --- a/lib/base64.c +++ b/lib/base64.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2022, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -273,7 +273,7 @@ static CURLcode base64_encode(const char *table64, free(convbuf); /* Return the length of the new data */ - *outlen = strlen(base64data); + *outlen = output - base64data; return CURLE_OK; } -- 2.47.3