From: Alan T. DeKok Date: Tue, 3 Jul 2018 17:15:36 +0000 (-0400) Subject: only allow real data types X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7a53fc64a6cf1ea9505ee5ff05a8f98685b33ab;p=thirdparty%2Ffreeradius-server.git only allow real data types --- diff --git a/src/main/command.c b/src/main/command.c index 4270b6c14f5..f3671304c0c 100644 --- a/src/main/command.c +++ b/src/main/command.c @@ -328,9 +328,16 @@ int fr_command_add(TALLOC_CTX *talloc_ctx, fr_cmd_t **head, char const *name, vo fr_type_t type; type = fr_str2int(dict_attr_types, argv[i], FR_TYPE_INVALID); - if (type == FR_TYPE_INVALID) { + switch (type) { + case FR_TYPE_ABINARY: + case FR_TYPE_VALUE_BOX: + case FR_TYPE_BAD: + case FR_TYPE_STRUCTURAL: fr_strerror_printf("Syntax command %d has unknown data type", i); return -1; + + default: + break; } types[i] = type;