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:
committed by
Gerald (Jerry) Carter
parent
5101cd51a2
commit
b4fd76f78e
@@ -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++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user