summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/common/ldb_ldif.c8
-rw-r--r--source4/lib/ldb/tests/init.ldif1
2 files changed, 7 insertions, 2 deletions
diff --git a/source4/lib/ldb/common/ldb_ldif.c b/source4/lib/ldb/common/ldb_ldif.c
index bd99468182..94e15805a6 100644
--- a/source4/lib/ldb/common/ldb_ldif.c
+++ b/source4/lib/ldb/common/ldb_ldif.c
@@ -128,7 +128,11 @@ int ldb_should_b64_encode(const struct ldb_val *val)
unsigned int i;
uint8_t *p = val->data;
- if (val->length == 0 || p[0] == ' ' || p[0] == ':') {
+ if (val->length == 0) {
+ return 0;
+ }
+
+ if (p[0] == ' ' || p[0] == ':') {
return 1;
}
@@ -377,7 +381,7 @@ static int next_attr(char **s, const char **attr, struct ldb_val *value)
*attr = *s;
- while (isspace(*p)) {
+ while (*p == ' ' || *p == '\t') {
p++;
}
diff --git a/source4/lib/ldb/tests/init.ldif b/source4/lib/ldb/tests/init.ldif
index a9ed4506fb..3b0eeffe2f 100644
--- a/source4/lib/ldb/tests/init.ldif
+++ b/source4/lib/ldb/tests/init.ldif
@@ -9,6 +9,7 @@ o: UM
o: U-M
o: U of M
description: The University of Michigan at Ann Arbor
+seeAlso:
postaladdress: University of Michigan $ 535 W. William St. $ Ann Arbor, MI 481
09 $ US
telephonenumber: +1 313 764-1817