From 7017f2246890fb30c61f1699991d31f0d6a7b929 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 10 Sep 2002 02:55:05 +0000 Subject: [PATCH] Fix ITS#2055, avoid roundoff errors in LUTIL_BASE64_DECODE_LEN --- include/lutil.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ -- 2.39.5