From: Howard Chu Date: Tue, 10 Sep 2002 02:55:05 +0000 (+0000) Subject: Fix ITS#2055, avoid roundoff errors in LUTIL_BASE64_DECODE_LEN X-Git-Tag: NO_SLAP_OP_BLOCKS~994 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7017f2246890fb30c61f1699991d31f0d6a7b929;p=openldap Fix ITS#2055, avoid roundoff errors in LUTIL_BASE64_DECODE_LEN --- diff --git a/include/lutil.h b/include/lutil.h index 4a53306b81..cae38a3430 100644 --- a/include/lutil.h +++ b/include/lutil.h @@ -26,7 +26,7 @@ LDAP_BEGIN_DECL /* Avoid floating point math by through extra padding */ #define LUTIL_BASE64_ENCODE_LEN(n) ((n)/3 * 4 + 4) -#define LUTIL_BASE64_DECODE_LEN(n) ((n)/4 * 3) +#define LUTIL_BASE64_DECODE_LEN(n) (((n)+3)/4 * 3) /* ISC Base64 Routines */ /* base64.c */