From a96d59a675d4996878c6552d8f7d90d95f95fe6b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 19 Jun 2005 01:17:29 +0000 Subject: r7739: fixed an off by one bug in the base64 decoder for ldb ldif --- source/lib/ldb/common/ldb_ldif.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/lib/ldb/common/ldb_ldif.c') diff --git a/source/lib/ldb/common/ldb_ldif.c b/source/lib/ldb/common/ldb_ldif.c index 546cf461f87..225fa3f3c90 100644 --- a/source/lib/ldb/common/ldb_ldif.c +++ b/source/lib/ldb/common/ldb_ldif.c @@ -71,6 +71,9 @@ static int base64_decode(char *s) } s++; i++; } + if (bit_offset >= 3) { + n--; + } if (*s && !p) { /* the only termination allowed */ -- cgit