From caba8208505a9883d7121c55ca6791b32832ff29 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 29 May 2022 15:57:12 +0300 Subject: fix for the buffer calculation in base64_decode --- src/mir_core/src/http.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mir_core/src/http.cpp b/src/mir_core/src/http.cpp index 2494467ad3..12d2add914 100644 --- a/src/mir_core/src/http.cpp +++ b/src/mir_core/src/http.cpp @@ -164,7 +164,7 @@ MIR_CORE_DLL(void*) mir_base64_decode(const char *input, size_t *outputLen) return nullptr; size_t length = strlen(input); - size_t nLength = (length / 4) * 3; + size_t nLength = ((length + 3) / 4) * 3; const char *stop = input + length; char *output = (char *)mir_alloc(nLength+1); -- cgit v1.2.3