mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
ITS#357: at_cn == NULL causes crash
This commit is contained in:
parent
be51328c8b
commit
8032f5885d
@ -124,6 +124,13 @@ bdb2i_index_read(
|
||||
attr_normalize( type );
|
||||
at_cn = at_canonical_name(type);
|
||||
|
||||
if ( at_cn == NULL ) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"<= bdb2i_index_read no canonical name for type \"%s\"\n",
|
||||
type != NULL ? type : "(NULL)", 0, 0 );
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
if ( (db = bdb2i_cache_open( be, at_cn, BDB2_SUFFIX, LDBM_WRCREAT ))
|
||||
== NULL ) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
|
@ -148,11 +148,18 @@ index_read(
|
||||
attr_normalize( type );
|
||||
at_cn = at_canonical_name( type );
|
||||
|
||||
if ( at_cn == NULL ) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"<= index_read no canonical name for type \"%s\"\n",
|
||||
type != NULL ? type : "(NULL)", 0, 0 );
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
if ( (db = ldbm_cache_open( be, at_cn, LDBM_SUFFIX, LDBM_WRCREAT ))
|
||||
== NULL ) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"<= index_read NULL (could not open %s%s)\n", at_cn,
|
||||
LDBM_SUFFIX, 0 );
|
||||
"<= index_read NULL (could not open %s%s)\n",
|
||||
at_cn, LDBM_SUFFIX, 0 );
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user