Skip to content
Snippets Groups Projects
Commit 7017f224 authored by Howard Chu's avatar Howard Chu
Browse files

Fix ITS#2055, avoid roundoff errors in LUTIL_BASE64_DECODE_LEN

parent 890d4b94
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment