From: Pierangelo Masarati Date: Thu, 6 Mar 2008 23:30:54 +0000 (+0000) Subject: fix attribute description parsing (ITS#5402) X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~111 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9ca53f98edcf48336da88a5371e6f2d59bbeca51;p=openldap fix attribute description parsing (ITS#5402) --- diff --git a/servers/slapd/sets.c b/servers/slapd/sets.c index 7f3f8ceba8..d7c56fa9ed 100644 --- a/servers/slapd/sets.c +++ b/servers/slapd/sets.c @@ -709,20 +709,19 @@ slap_set_filter( SLAP_SET_GATHER gatherer, break; default: - if ( ( c != '_' ) - && ( c < 'A' || c > 'Z' ) - && ( c < 'a' || c > 'z' ) ) - { + if ( !AD_LEADCHAR( c ) ) { SF_ERROR( syntax ); } filter--; for ( len = 1; - ( c = filter[ len ] ) - && ( ( c >= '0' && c <= '9' ) - || ( c >= 'A' && c <= 'Z' ) - || ( c >= 'a' && c <= 'z' ) ); - len++ ) - /* count */ ; + ( c = filter[ len ] ) && AD_CHAR( c ); + len++ ) + { + /* count */ + if ( c == '-' && !AD_CHAR( filter[ len + 1 ] ) ) { + break; + } + } if ( len == 4 && memcmp( "this", filter, len ) == 0 ) {