summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mir_core/src/http.cpp2
1 files changed, 1 insertions, 1 deletions
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);