/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2000-2007 The OpenLDAP Foundation.
+ * Copyright 2000-2008 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
cp->set_op->o_tmpfree( rset[ i ].bv_val, cp->set_op->o_tmpmemctx );
rset[ i ] = rset[ --rlast ];
BER_BVZERO( &rset[ rlast ] );
+ i--;
}
exists = 1;
break;
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 )
{
+ assert( !BER_BVISNULL( target ) );
if ( ( SF_TOP() == (void *)'/' ) || IS_SET( SF_TOP() ) ) {
SF_ERROR( syntax );
}
if ( ( SF_TOP() == (void *)'/' ) || IS_SET( SF_TOP() ) ) {
SF_ERROR( syntax );
}
+ if ( BER_BVISNULL( user ) ) {
+ SF_ERROR( memory );
+ }
set = cp->set_op->o_tmpcalloc( 2, sizeof( struct berval ),
cp->set_op->o_tmpmemctx );
if ( set == NULL ) {
SF_ERROR( memory );
}
ber_dupbv_x( set, user, cp->set_op->o_tmpmemctx );
- if ( BER_BVISNULL( set ) ) {
- SF_ERROR( memory );
- }
BER_BVZERO( &set[ 1 ] );
} else if ( SF_TOP() != (void *)'/' ) {