]> git.sur5r.net Git - openldap/commitdiff
Fix crash when a mail list appears twice in the expansion, maybe
authorJulio Sánchez Fernández <jsanchez@openldap.org>
Fri, 24 Nov 2000 17:46:18 +0000 (17:46 +0000)
committerJulio Sánchez Fernández <jsanchez@openldap.org>
Fri, 24 Nov 2000 17:46:18 +0000 (17:46 +0000)
because of loop, maybe legitimately.

Make check for already seen mail group case insensitive.

clients/maildap/main.c

index d5a258b99b7c7565788c7ec9b50491a358fc8ae6..f45d3fe9491a987254023bc89937dde498b357de 100644 (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,