1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

base64: Fixed decode buffer size estimation

Fixed required result buffer size underestimation in base64_estimate_decode_size() function.
This commit is contained in:
Maciej Jurczak 2020-06-25 22:52:38 +02:00 committed by Marian Buschsieweke
parent 325b7a8d8e
commit f8ac003bbf
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F

View File

@ -41,7 +41,7 @@ extern "C" {
*/
static inline size_t base64_estimate_decode_size(size_t base64_in_size)
{
return ((base64_in_size / 4) * 3);
return (((base64_in_size + 3) / 4) * 3);
}
/**