codegen: fix infinite loop for wrong check/enum
@@ -292,6 +292,11 @@ kainjow::mustache::list EnumProcessor::getValues (const std::string & prefix, co
std::set<std::pair<std::string, std::string>> stringValues;
const auto end = key.getMeta<std::string> ("check/enum");
+ if (ckdb::elektraArrayValidateBaseNameString (end.c_str ()) < 0)
+ {
+ throw CommandAbortException ("The key '" + key.getName () + "' has invalid check/enum metadata: " + end);
+ }
+
kdb::long_long_t i = 0;
std::string cur = "#0";
while (cur <= end)
