mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-01 20:49:35 -05:00
Return LDAP_BAD_PARAM if res is not EXOP result.
Skip over referrals that might exist in EXOP result.
This commit is contained in:
parent
09a007c031
commit
613bf0b077
1 changed files with 14 additions and 0 deletions
|
|
@ -170,6 +170,11 @@ ldap_parse_extended_result (
|
|||
return ld->ld_errno;
|
||||
}
|
||||
|
||||
if( res->lm_msgtype == LDAP_RES_EXTENDED ) {
|
||||
ld->ld_errno = LDAP_PARAM_ERROR;
|
||||
return ld->ld_errno;
|
||||
}
|
||||
|
||||
if( retoidp != NULL ) *retoidp = NULL;
|
||||
if( retdatap != NULL ) *retdatap = NULL;
|
||||
|
||||
|
|
@ -199,6 +204,15 @@ ldap_parse_extended_result (
|
|||
|
||||
tag = ber_peek_tag( ber, &len );
|
||||
|
||||
if( tag == LDAP_TAG_REFERRAL ) {
|
||||
/* skip over referral */
|
||||
tag = ber_scanf( ber, "x" );
|
||||
|
||||
if( tag != LBER_ERROR ) {
|
||||
tag = ber_peek_tag( ber, &len );
|
||||
}
|
||||
}
|
||||
|
||||
if( tag == LDAP_TAG_EXOP_RES_OID ) {
|
||||
/* we have a resoid */
|
||||
if( ber_scanf( ber, "a", &resoid ) == LBER_ERROR ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue