mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Fix str2anlist declaration, str is not const. (gets overwritten if
there is an error.)
This commit is contained in:
parent
f757db004c
commit
54dae3d3d3
@ -435,7 +435,7 @@ an_find(
|
||||
* to an existing list if it was given.
|
||||
*/
|
||||
AttributeName *
|
||||
str2anlist( AttributeName *an, const char *in, const char *brkstr )
|
||||
str2anlist( AttributeName *an, char *in, const char *brkstr )
|
||||
{
|
||||
char *str;
|
||||
char *s;
|
||||
@ -473,7 +473,7 @@ str2anlist( AttributeName *an, const char *in, const char *brkstr )
|
||||
if ( !anew->an_oc ) {
|
||||
free( an );
|
||||
/* overwrites input string on error! */
|
||||
strcpy( (char *)in, s );
|
||||
strcpy( in, s );
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ LDAP_SLAPD_F (AttributeDescription *) ad_find_lang LDAP_P((
|
||||
struct berval *lang ));
|
||||
|
||||
LDAP_SLAPD_F (AttributeName *) str2anlist LDAP_P(( AttributeName *an,
|
||||
const char *str, const char *brkstr ));
|
||||
char *str, const char *brkstr ));
|
||||
LDAP_SLAPD_F (int) an_find LDAP_P(( AttributeName *a, struct berval *s ));
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user