parameter source parser: validate length of parameter name (limited to 16)

This commit is contained in:
Beat Küng 2016-05-12 16:11:26 +02:00 committed by Lorenz Meier
parent 97bcea292e
commit 6a07d61671
1 changed files with 3 additions and 0 deletions

View File

@ -284,6 +284,9 @@ class SourceParser(object):
for group in self.GetParamGroups():
for param in group.GetParams():
name = param.GetName()
if len(name) > 16:
sys.stderr.write("Parameter Name {0} is too long (Limit is 16)\n".format(name))
return False
board = param.GetFieldValue("board")
# Check for duplicates
name_plus_board = name + "+" + board