]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#357: don't crash when at_cn == NULL.
authorKurt Zeilenga <kurt@openldap.org>
Wed, 17 Nov 1999 22:58:01 +0000 (22:58 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 17 Nov 1999 22:58:01 +0000 (22:58 +0000)
servers/slapd/back-ldbm/index.c

index 3fb8a9afa644380119d7c7a96f4e4d5e7414dd91..f0e892726d673ba208cf4ee4c146014856a83ec3 100644 (file)
@@ -298,6 +298,13 @@ index_change_values(
        /* at_cn = at_canonical_name( type ); */
        at_cn = type;
 
+       if ( at_cn == NULL ) {
+               Debug( LDAP_DEBUG_ANY,
+                       "<= index_change_values no canonical name for type \"%s\"\n",
+                       type != NULL ? type : "(NULL)", 0, 0 );
+               return( -1 );
+       }
+
        if ( (db = ldbm_cache_open( be, at_cn, LDBM_SUFFIX, mode ))
             == NULL ) {
                Debug( LDAP_DEBUG_ANY,