summaryrefslogtreecommitdiffstats
path: root/source/lib/ldb/common/ldb_ldif.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-19 01:17:29 +0000
committerAndrew Tridgell <tridge@samba.org>2005-06-19 01:17:29 +0000
commita96d59a675d4996878c6552d8f7d90d95f95fe6b (patch)
tree15e928db2ee9143754f98f1889d49a09e4b5ccd0 /source/lib/ldb/common/ldb_ldif.c
parent247f754ad1a61f9936ef0c4c2df606e26f32274a (diff)
downloadsamba-a96d59a675d4996878c6552d8f7d90d95f95fe6b.tar.gz
samba-a96d59a675d4996878c6552d8f7d90d95f95fe6b.tar.xz
samba-a96d59a675d4996878c6552d8f7d90d95f95fe6b.zip
r7739: fixed an off by one bug in the base64 decoder for ldb ldif
Diffstat (limited to 'source/lib/ldb/common/ldb_ldif.c')
-rw-r--r--source/lib/ldb/common/ldb_ldif.c3
1 files changed, 3 insertions, 0 deletions
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 */