mirror of
https://github.com/samba-team/samba.git
synced 2025-01-28 17:47:29 +03:00
when comp_num is zero, the case folded DN is always ""
This fixes a bug where we would look at an uninitialised dn->linearized
This commit is contained in:
parent
ba95882155
commit
7f16c29f10
@ -846,14 +846,8 @@ const char *ldb_dn_get_casefold(struct ldb_dn *dn)
|
||||
}
|
||||
|
||||
if (dn->comp_num == 0) {
|
||||
if (dn->linearized && dn->linearized[0] == '\0') {
|
||||
/* hmm a NULL dn, should we faild casefolding ? */
|
||||
dn->casefold = talloc_strdup(dn, "");
|
||||
return dn->casefold;
|
||||
}
|
||||
/* A DN must be NULL, special, or have components */
|
||||
dn->invalid = true;
|
||||
return NULL;
|
||||
dn->casefold = talloc_strdup(dn, "");
|
||||
return dn->casefold;
|
||||
}
|
||||
|
||||
/* calculate maximum possible length of DN */
|
||||
|
Loading…
x
Reference in New Issue
Block a user