This commit is contained in:
Frank Denis
2017-08-31 20:14:16 +02:00
parent 0af31aeb26
commit 5c8b8ea01c
+1 -4
View File
@@ -177,10 +177,7 @@ sodium_bin2base64(char * const b64, const size_t b64_maxlen,
if ((((unsigned int) variant) & VARIANT_NO_PADDING_MASK) == 0U) {
b64_len += 4;
} else {
b64_len += 2;
if (remainder == 2) {
b64_len++;
}
b64_len += 2 + (remainder >> 1);
}
}
if (b64_maxlen <= b64_len) {