From d96236b5cefcf2d041e7580129563c87acfac77d Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Thu, 2 Jan 2003 15:01:56 +0000 Subject: [PATCH] Fix attribute value parsing in objectIdentifierFirstComponentMatch(). --- servers/slapd/schema_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index df2f3157a3..424d32873d 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -3449,7 +3449,7 @@ objectIdentifierFirstComponentMatch( int rc = LDAP_SUCCESS; int match; struct berval *asserted = (struct berval *) assertedValue; - ber_len_t i; + ber_len_t i, j; struct berval oid; if( value->bv_len == 0 || value->bv_val[0] != '(' /*')'*/ ) { @@ -3463,8 +3463,8 @@ objectIdentifierFirstComponentMatch( /* grab next word */ oid.bv_val = &value->bv_val[i]; - oid.bv_len = value->bv_len - i; - for( i=1; ASCII_SPACE(value->bv_val[i]) && i < oid.bv_len; i++ ) { + j = value->bv_len - i; + for( i=0; !ASCII_SPACE(oid.bv_val[i]) && i < j; i++ ) { /* empty */ } oid.bv_len = i; -- 2.39.5