From: Howard Chu Date: Tue, 18 Sep 2001 12:21:33 +0000 (+0000) Subject: Fix for ITS#1258 - even if we're accepting various malformed definitions, X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1089 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=384cbde4f5d068a55aa760ad3507e43b0770fcd3;p=openldap Fix for ITS#1258 - even if we're accepting various malformed definitions, don't allow OIDs that are a mix of numeric and non-numeric fields. --- diff --git a/libraries/libldap/schema.c b/libraries/libldap/schema.c index ae482c3086..18a6648358 100644 --- a/libraries/libldap/schema.c +++ b/libraries/libldap/schema.c @@ -1658,8 +1658,9 @@ ldap_str2attributetype( const char * s, int * code, const char ** errp, const in savepos = ss; at->at_oid = parse_numericoid(&ss,code,0); if ( !at->at_oid ) { - if ( flags & ( LDAP_SCHEMA_ALLOW_NO_OID - | LDAP_SCHEMA_ALLOW_OID_MACRO ) ) { + if ( ( flags & ( LDAP_SCHEMA_ALLOW_NO_OID + | LDAP_SCHEMA_ALLOW_OID_MACRO ) ) + && (ss == savepos) ) { /* Backtracking */ ss = savepos; kind = get_token(&ss,&sval); @@ -2031,7 +2032,7 @@ ldap_str2objectclass( const char * s, int * code, const char ** errp, const int savepos = ss; oc->oc_oid = parse_numericoid(&ss,code,0); if ( !oc->oc_oid ) { - if ( flags & LDAP_SCHEMA_ALLOW_ALL ) { + if ( (flags & LDAP_SCHEMA_ALLOW_ALL) && (ss == savepos) ) { /* Backtracking */ ss = savepos; kind = get_token(&ss,&sval);