mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-03 05:30:07 -05:00
Fix segfault if entry_get is called with NULL attribute
This commit is contained in:
parent
bb13266a15
commit
20902a2be3
3 changed files with 8 additions and 6 deletions
|
|
@ -231,7 +231,7 @@ int bdb_entry_get(
|
|||
Entry *e = NULL;
|
||||
EntryInfo *ei;
|
||||
int rc;
|
||||
const char *at_name = at->ad_cname.bv_val;
|
||||
const char *at_name = at ? at->ad_cname.bv_val : "(null)";
|
||||
|
||||
u_int32_t locker = 0;
|
||||
DB_LOCK lock;
|
||||
|
|
|
|||
|
|
@ -605,10 +605,12 @@ ldap_back_entry_get(
|
|||
return 1;
|
||||
}
|
||||
|
||||
ldap_back_map(&li->rwmap.rwm_at, &at->ad_cname, &mapped, BACKLDAP_MAP);
|
||||
if (mapped.bv_val == NULL || mapped.bv_val[0] == '\0') {
|
||||
rc = 1;
|
||||
goto cleanup;
|
||||
if ( at ) {
|
||||
ldap_back_map(&li->rwmap.rwm_at, &at->ad_cname, &mapped, BACKLDAP_MAP);
|
||||
if (mapped.bv_val == NULL || mapped.bv_val[0] == '\0') {
|
||||
rc = 1;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
is_oc = (strcasecmp("objectclass", mapped.bv_val) == 0);
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ int ldbm_back_entry_get(
|
|||
struct ldbminfo *li = (struct ldbminfo *) op->o_bd->be_private;
|
||||
Entry *e;
|
||||
int rc;
|
||||
const char *at_name = at->ad_cname.bv_val;
|
||||
const char *at_name = at ? at->ad_cname.bv_val : "(null)";
|
||||
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( BACK_LDBM, ARGS,
|
||||
|
|
|
|||
Loading…
Reference in a new issue