Commit d96236b5 authored by Hallvard Furuseth's avatar Hallvard Furuseth
Browse files

Fix attribute value parsing in objectIdentifierFirstComponentMatch().

parent 3dea614e
...@@ -3449,7 +3449,7 @@ objectIdentifierFirstComponentMatch( ...@@ -3449,7 +3449,7 @@ objectIdentifierFirstComponentMatch(
int rc = LDAP_SUCCESS; int rc = LDAP_SUCCESS;
int match; int match;
struct berval *asserted = (struct berval *) assertedValue; struct berval *asserted = (struct berval *) assertedValue;
ber_len_t i; ber_len_t i, j;
struct berval oid; struct berval oid;
if( value->bv_len == 0 || value->bv_val[0] != '(' /*')'*/ ) { if( value->bv_len == 0 || value->bv_val[0] != '(' /*')'*/ ) {
...@@ -3463,8 +3463,8 @@ objectIdentifierFirstComponentMatch( ...@@ -3463,8 +3463,8 @@ objectIdentifierFirstComponentMatch(
/* grab next word */ /* grab next word */
oid.bv_val = &value->bv_val[i]; oid.bv_val = &value->bv_val[i];
oid.bv_len = value->bv_len - i; j = value->bv_len - i;
for( i=1; ASCII_SPACE(value->bv_val[i]) && i < oid.bv_len; i++ ) { for( i=0; !ASCII_SPACE(oid.bv_val[i]) && i < j; i++ ) {
/* empty */ /* empty */
} }
oid.bv_len = i; oid.bv_len = i;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment