diff --git a/src/common/util_format.c b/src/common/util_format.c index 80844af5b3..f6788e9687 100644 --- a/src/common/util_format.c +++ b/src/common/util_format.c @@ -22,8 +22,10 @@ #include /* Return the base32 encoded size in bytes using the source length srclen. - * The NUL terminated byte is added as well since every base32 encoding - * requires enough space for it. */ + * + * (WATCH OUT: This API counts the terminating NUL byte, but + * base64_encode_size does not.) + */ size_t base32_encoded_size(size_t srclen) { @@ -133,7 +135,8 @@ base32_decode(char *dest, size_t destlen, const char *src, size_t srclen) /** Return the Base64 encoded size of srclen bytes of data in * bytes. * - * Does NOT count the terminating NUL. + * (WATCH OUT: This API does not count the terminating NUL byte, + * but base64_encoded_size does.) * * If flags&BASE64_ENCODE_MULTILINE is true, return the size * of the encoded output as multiline output (64 character, `\n' terminated