From: Alan T. DeKok Date: Sun, 4 Oct 2020 20:21:53 +0000 (-0400) Subject: don't check if values are valid attribute names X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dad4a78537da2c7d09307601db1df0a93f0841ff;p=thirdparty%2Ffreeradius-server.git don't check if values are valid attribute names The VALUE parser in the dictionaries just strdup's the name. So we shouldn't have more stringent checks here. Embedded zeros, etc. should be taken care of by passing an explicit length to fr_dict_enum_by_name() --- diff --git a/src/lib/util/value.c b/src/lib/util/value.c index 56cd1f1968c..53793c98c6b 100644 --- a/src/lib/util/value.c +++ b/src/lib/util/value.c @@ -4194,18 +4194,6 @@ int fr_value_box_from_str(TALLOC_CTX *ctx, fr_value_box_t *dst, } fr_assert(name); - /* - * Check the name name is valid first before bothering - * to look it up. - * - * Catches any embedded \0 bytes that might cause - * incorrect results. - */ - if (fr_dict_valid_name(name, name_len) <= 0) { - if (tmp) talloc_free(tmp); - goto parse; - } - enumv = fr_dict_enum_by_name(dst_enumv, name, name_len); if (tmp) talloc_free(tmp); if (!enumv) goto parse;