mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-21 15:19:34 -05:00
Eliminate overallocation in LUTIL_BASE64_ENCODE_LEN
This commit is contained in:
parent
7017f22468
commit
1dbbccc3fe
1 changed files with 2 additions and 2 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue