1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-18 00:23:50 +03:00

r4010: fixed parsing of null attributes in the ldb ldif parser

This commit is contained in:
Andrew Tridgell
2004-11-30 02:15:43 +00:00
committed by Gerald (Jerry) Carter
parent 5101cd51a2
commit b4fd76f78e
2 changed files with 7 additions and 2 deletions

View File

@@ -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++;
}