checkwps: Validate %?St() tags

This will bail if referenced setting name does not exist.

Change-Id: I7abd54ec1260d3da6024ebec809f8e270b0a84e5
This commit is contained in:
Solomon Peachy 2025-09-27 10:15:28 -04:00
parent d57e1a21d1
commit d7d7627baf
6 changed files with 91 additions and 22 deletions

View file

@ -829,19 +829,12 @@ static int parse_setting_and_lang(struct skin_element *element,
}
else
{
/* NOTE: The string validations that happen here will
* automatically PASS on checkwps because its too hard to get
* settings_list.c built for a specific target.
* If that ever changes remove the #ifndef __PCTOOL__ here
*/
#ifndef __PCTOOL__
const struct settings_list *setting = find_setting_by_cfgname(temp);
if (!setting) {
DEBUGF("Invalid setting [%s]\n", temp);
return WPS_ERROR_INVALID_PARAM;
}
token->value.xdata = (void *)setting;
#endif
}
return 0;
}