From 6ae3796ade2ec7d7c24a9428860cfc1bacae21b8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julio=20S=C3=A1nchez=20Fern=C3=A1ndez?= Date: Fri, 24 Nov 2000 17:46:18 +0000 Subject: [PATCH] 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. --- clients/maildap/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/clients/maildap/main.c b/clients/maildap/main.c index d5a258b99b..f45d3fe949 100644 --- a/clients/maildap/main.c +++ b/clients/maildap/main.c @@ -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 = ¤t_group->g_members; current_nto = ¤t_group->g_nmembers; split_address( address, -- 2.39.5