git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc6ed8f
)
dsdb/common/util: be careful about zero length string lists
author
Douglas Bagnall
<douglas.bagnall@catalyst.net.nz>
Fri, 6 May 2016 03:25:54 +0000
(15:25 +1200)
committer
Andrew Bartlett
<abartlet@samba.org>
Mon, 9 May 2016 23:43:14 +0000
(
01:43
+0200)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/common/util.c
patch
|
blob
|
history
diff --git
a/source4/dsdb/common/util.c
b/source4/dsdb/common/util.c
index c905790a25e8150095cb28621001f4ab48dc13cb..84d3c6b2c42e9f4ea1c5153447e1a73535bd510a 100644
(file)
--- a/
source4/dsdb/common/util.c
+++ b/
source4/dsdb/common/util.c
@@
-3555,8
+3555,9
@@
const char *samdb_cn_to_lDAPDisplayName(TALLOC_CTX *mem_ctx, const char *cn)
size_t i;
tokens = str_list_make(mem_ctx, cn, " -_");
- if (tokens == NULL
)
+ if (tokens == NULL
|| tokens[0] == NULL) {
return NULL;
+ }
/* "tolower()" and "toupper()" should also work properly on 0x00 */
tokens[0][0] = tolower(tokens[0][0]);