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

Eliminate overallocation in LUTIL_BASE64_ENCODE_LEN

parent 7017f224
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment