mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
From: h.b.furuseth@usit.uio.no
Patch: str2entry() dereferences NULL (ITS#1822) Sorry, last patch was wrong. I didn't notice that e->e_dn always is NULL at that point. Here is a corrected patch.
This commit is contained in:
parent
4ac8a54b56
commit
3abec7d8d7
@ -129,22 +129,21 @@ str2entry( char *s )
|
|||||||
}
|
}
|
||||||
|
|
||||||
rc = dnPrettyNormal( NULL, &vals[0], &e->e_name, &e->e_nname );
|
rc = dnPrettyNormal( NULL, &vals[0], &e->e_name, &e->e_nname );
|
||||||
free( vals[0].bv_val );
|
|
||||||
if( rc != LDAP_SUCCESS ) {
|
if( rc != LDAP_SUCCESS ) {
|
||||||
#ifdef NEW_LOGGING
|
#ifdef NEW_LOGGING
|
||||||
LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1, "str2entry: "
|
LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1, "str2entry: "
|
||||||
"entry %ld has invalid DN \"%s\"\n",
|
"entry %ld has invalid DN \"%s\"\n",
|
||||||
(long) e->e_id,
|
(long) e->e_id, vals[0].bv_val ));
|
||||||
e->e_dn ? e->e_dn : "" ));
|
|
||||||
#else
|
#else
|
||||||
Debug( LDAP_DEBUG_ANY, "str2entry: "
|
Debug( LDAP_DEBUG_ANY, "str2entry: "
|
||||||
"entry %ld has invalid DN \"%s\"\n",
|
"entry %ld has invalid DN \"%s\"\n",
|
||||||
(long) e->e_id,
|
(long) e->e_id, vals[0].bv_val, 0 );
|
||||||
e->e_dn ? e->e_dn : "", 0 );
|
|
||||||
#endif
|
#endif
|
||||||
entry_free( e );
|
entry_free( e );
|
||||||
|
free( vals[0].bv_val );
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
free( vals[0].bv_val );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user