diff options
Diffstat (limited to 'src/common/util_format.c')
-rw-r--r-- | src/common/util_format.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/util_format.c b/src/common/util_format.c index aef9db85c8..6e0a04586a 100644 --- a/src/common/util_format.c +++ b/src/common/util_format.c @@ -398,7 +398,7 @@ base64_decode(char *dest, size_t destlen, const char *src, size_t srclen) * Number of bytes required to hold all bits == (srclen*6)/8. * Yes, we want to round down: anything that hangs over the end of a * byte is padding. */ - if (destlen < (srclen*3)/4) + if (!size_mul_check(srclen, 3) || destlen < (srclen*3)/4) return -1; if (destlen > SIZE_T_CEILING) return -1; |