]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
only set fixed length for leaf types which have fixed length
authorAlan T. DeKok <aland@freeradius.org>
Tue, 5 Sep 2023 13:36:39 +0000 (09:36 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 5 Sep 2023 13:36:39 +0000 (09:36 -0400)
src/lib/util/dict_validate.c

index aa891a90f72a6f05e98e62f1e61aae4e6762f027..4ff8ff0f9261913f52f04516dc3a4827d3203c1d 100644 (file)
@@ -677,7 +677,7 @@ bool dict_attr_fields_valid(fr_dict_t *dict, fr_dict_attr_t const *parent,
        /*
         *      Initialize the length field, which is needed for the attr_valid() callback.
         */
-       if (!flags->length) {
+       if (!flags->length && fr_type_is_leaf(type) && !fr_type_is_variable_size(type)) {
                fr_value_box_t box;
 
                fr_value_box_init(&box, type, NULL, false);