]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
base64: remove an unnecessary call to strlen
authorHenrik Holst <henrik.holst@millistream.com>
Tue, 1 Feb 2022 12:39:06 +0000 (13:39 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 1 Feb 2022 15:09:49 +0000 (16:09 +0100)
Closes #8369

lib/base64.c

index be6f163dc450cefd90596ef7a2d186089aeb25ef..527e29955a3e7a924843676a313073952879d297 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, 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;
 }