From: Arran Cudbard-Bell Date: Sun, 17 May 2015 22:46:48 +0000 (-0400) Subject: Disallow TMPL_TYPE_ATTR_UNDEFINED and throw an error in pass2 X-Git-Tag: release_3_0_9~340 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=381309bab3098dc30ae4be93e4a49ce1250770e9;p=thirdparty%2Ffreeradius-server.git Disallow TMPL_TYPE_ATTR_UNDEFINED and throw an error in pass2 --- diff --git a/src/main/conffile.c b/src/main/conffile.c index de8f28ede65..377bd4396f5 100644 --- a/src/main/conffile.c +++ b/src/main/conffile.c @@ -1793,9 +1793,15 @@ int cf_section_parse_pass2(CONF_SECTION *cs, void *base, CONF_PARSER const *vari * Don't add default - update with new types. */ switch (vpt->type) { + /* + * All attributes should have been defined by this point. + */ + case TMPL_TYPE_ATTR_UNDEFINED: + cf_log_err(&cp->item, "Unknown attribute '%s'", vpt->tmpl_unknown_name); + return -1; + case TMPL_TYPE_LITERAL: case TMPL_TYPE_ATTR: - case TMPL_TYPE_ATTR_UNDEFINED: case TMPL_TYPE_LIST: case TMPL_TYPE_DATA: case TMPL_TYPE_EXEC: