mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
r2374: Fix from Vince Brimhall vbrimhall@novell.com for
ldapsam_compat. Be robust against NULL attributes.
Jeremy.
(This used to be commit 727fc341b5
)
This commit is contained in:
parent
40a89ce884
commit
b0d376ba07
@ -1229,8 +1229,13 @@ static void append_attr(char ***attr_list, const char *new_attr)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; (*attr_list)[i] != NULL; i++)
|
||||
if (new_attr == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (i=0; (*attr_list)[i] != NULL; i++) {
|
||||
;
|
||||
}
|
||||
|
||||
(*attr_list) = Realloc((*attr_list), sizeof(**attr_list) * (i+2));
|
||||
SMB_ASSERT((*attr_list) != NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user