Skip to content
Snippets Groups Projects
Commit 3abec7d8 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

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.
parent 4ac8a54b
No related branches found
No related tags found
No related merge requests found
......@@ -129,22 +129,21 @@ str2entry( char *s )
}
rc = dnPrettyNormal( NULL, &vals[0], &e->e_name, &e->e_nname );
free( vals[0].bv_val );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1, "str2entry: "
"entry %ld has invalid DN \"%s\"\n",
(long) e->e_id,
e->e_dn ? e->e_dn : "" ));
(long) e->e_id, vals[0].bv_val ));
#else
Debug( LDAP_DEBUG_ANY, "str2entry: "
"entry %ld has invalid DN \"%s\"\n",
(long) e->e_id,
e->e_dn ? e->e_dn : "", 0 );
(long) e->e_id, vals[0].bv_val, 0 );
#endif
entry_free( e );
free( vals[0].bv_val );
return NULL;
}
free( vals[0].bv_val );
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment