1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +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:
Jeremy Allison 2004-09-17 01:13:47 +00:00 committed by Gerald (Jerry) Carter
parent 40a89ce884
commit b0d376ba07

View File

@ -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);