Fix crash when a mail list appears twice in the expansion, maybe

because of loop, maybe legitimately.

Make check for already seen mail group case insensitive.
This commit is contained in:
Julio Sánchez Fernández 2000-11-24 17:46:18 +00:00
parent 04e2da58ed
commit 6ae3796ade

View file

@ -702,7 +702,7 @@ new_group( char *dn, Group ***list, int *nlist )
Group *this_group;
for ( i = 0; i < *nlist; i++ ) {
if ( strcmp( dn, (*list)[i]->g_dn ) == 0 ) {
if ( strcasecmp( dn, (*list)[i]->g_dn ) == 0 ) {
syslog( LOG_ALERT, "group loop 2 detected (%s)", dn );
return NULL;
}
@ -1317,6 +1317,13 @@ entry_engine(
} else {
current_group = new_group( dn, togroups,
ngroups );
if ( ! current_group )
/*
* We have already considered
* this group, so we just
* return resolved.
*/
return 1;
current_to = &current_group->g_members;
current_nto = &current_group->g_nmembers;
split_address( address,