summaryrefslogtreecommitdiff
path: root/src/utils/base64.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/base64.cpp')
-rw-r--r--src/utils/base64.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/base64.cpp b/src/utils/base64.cpp
index 342c39b0..b89ee9e7 100644
--- a/src/utils/base64.cpp
+++ b/src/utils/base64.cpp
@@ -34,7 +34,7 @@ static char base64_pad = '=';
unsigned char *php_base64_encode(const unsigned char *str, int length, int *ret_length) {
const unsigned char *current = str;
int i = 0;
- unsigned char *result = (unsigned char *)malloc(((length + 3 - length % 3) * 4 / 3 + 1) * sizeof(char));
+ auto result = (unsigned char *)malloc(((length + 3 - length % 3) * 4 / 3 + 1) * sizeof(char));
while (length > 2) { /* keep going until we have less than 24 bits */
result[i++] = base64_table[current[0] >> 2];