mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +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.
|
* to an existing list if it was given.
|
||||||
*/
|
*/
|
||||||
AttributeName *
|
AttributeName *
|
||||||
str2anlist( AttributeName *an, const char *in, const char *brkstr )
|
str2anlist( AttributeName *an, char *in, const char *brkstr )
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
char *s;
|
char *s;
|
||||||
@ -473,7 +473,7 @@ str2anlist( AttributeName *an, const char *in, const char *brkstr )
|
|||||||
if ( !anew->an_oc ) {
|
if ( !anew->an_oc ) {
|
||||||
free( an );
|
free( an );
|
||||||
/* overwrites input string on error! */
|
/* overwrites input string on error! */
|
||||||
strcpy( (char *)in, s );
|
strcpy( in, s );
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ LDAP_SLAPD_F (AttributeDescription *) ad_find_lang LDAP_P((
|
|||||||
struct berval *lang ));
|
struct berval *lang ));
|
||||||
|
|
||||||
LDAP_SLAPD_F (AttributeName *) str2anlist LDAP_P(( AttributeName *an,
|
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 ));
|
LDAP_SLAPD_F (int) an_find LDAP_P(( AttributeName *a, struct berval *s ));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user