]> git.sur5r.net Git - openldap/commitdiff
Add other half of ITS#2055 b64 len fix
authorKurt Zeilenga <kurt@openldap.org>
Tue, 10 Sep 2002 03:29:31 +0000 (03:29 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 10 Sep 2002 03:29:31 +0000 (03:29 +0000)
CHANGES
include/lutil.h

diff --git a/CHANGES b/CHANGES
index a63fc39b76da1c2a17164608d88f76af8235507a..8550bdf21695aec9cd13163833e138ba7abfe343 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -10,7 +10,7 @@ OpenLDAP 2.1.5 Engineering
        Fixed slapd one-level search with subordinates
        Fixed libldap DNS SRV buffer size bug
        Fixed liblber write bugs (ITS#1983)
-       Fixed liblutil b64 decode len bug (ITS#2055)
+       Fixed liblutil b64 length bugs (ITS#2055)
        Added slapadd lastmod attribute support
        Added ldap tools passfile (-y) support (ITS#2031)
        Added ldapmodify LDIFv1 control: support (ITS#2060)
index cae38a34303ee59edfc23a69779e59413602b406..339a4ad384cccff5224091f60accf5bc207012ce 100644 (file)
@@ -23,9 +23,9 @@
 LDAP_BEGIN_DECL
 
 /* n octets encode into ceiling(n/3) * 4 bytes */
-/* Avoid floating point math by through extra padding */
+/* Avoid floating point math through extra padding */
 
-#define LUTIL_BASE64_ENCODE_LEN(n)     ((n)/3 * 4 + 4)
+#define LUTIL_BASE64_ENCODE_LEN(n)     (((n)+2)/3 * 4)
 #define LUTIL_BASE64_DECODE_LEN(n)     (((n)+3)/4 * 3)
 
 /* ISC Base64 Routines */