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:
parent
325b7a8d8e
commit
f8ac003bbf
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user