From 25bae9a825b9302d4fce486bd3a246e5ee454c1a Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 17 Nov 1999 22:58:01 +0000 Subject: [PATCH] ITS#357: don't crash when at_cn == NULL. --- servers/slapd/back-ldbm/index.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/servers/slapd/back-ldbm/index.c b/servers/slapd/back-ldbm/index.c index 3fb8a9afa6..f0e892726d 100644 --- a/servers/slapd/back-ldbm/index.c +++ b/servers/slapd/back-ldbm/index.c @@ -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, -- 2.47.2