]> git.sur5r.net Git - openldap/commitdiff
Silently restrict index_intlen to 4-255.
authorHoward Chu <hyc@openldap.org>
Wed, 21 Nov 2007 03:24:49 +0000 (03:24 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 21 Nov 2007 03:24:49 +0000 (03:24 +0000)
servers/slapd/bconfig.c

index 3e4927657201f2d53b281a6383e919ce38a04867..4338eeaf96352952743c0659710384e5b7d78147 100644 (file)
@@ -1515,6 +1515,8 @@ config_generic(ConfigArgs *c) {
                        } else {
                                if ( c->value_int < 4 )
                                        c->value_int = 4;
+                               else if ( c->value_int > 255 )
+                                       c->value_int = 255;
                                slap_schema.si_mr_integerMatch->smr_usage |= SLAP_MR_ORDERED_INDEX;
                        }
                        index_intlen = c->value_int;