X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Ffilter.c;h=fba7bd3794397d784ff6ded3d5b220abf4814bb3;hb=7fe91339dfd08d6c4168c8493f5c1f0faca6ba54;hp=bf855f573470b0994357c52840bb880e11ab1093;hpb=6845c2510d319bfce88a55c0f8ae4bc3f3339e87;p=openldap diff --git a/servers/slapd/filter.c b/servers/slapd/filter.c index bf855f5734..fba7bd3794 100644 --- a/servers/slapd/filter.c +++ b/servers/slapd/filter.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2008 The OpenLDAP Foundation. + * Copyright 1998-2009 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -385,6 +385,19 @@ get_ssa( rc = LDAP_PROTOCOL_ERROR; + if ( ssa.sa_desc->ad_type->sat_substr == NULL ) { + for ( tag = ber_first_element( ber, &len, &last ); + tag != LBER_DEFAULT; + tag = ber_next_element( ber, &len, last ) ) + { + /* eat all */ + rc = ber_scanf( ber, "x" ); + } + + rc = LDAP_INVALID_SYNTAX; + goto return_error; + } + for ( tag = ber_first_element( ber, &len, &last ); tag != LBER_DEFAULT; tag = ber_next_element( ber, &len, last ) )