From fddd65ccb10b7a3e2ab3db373107bc9476ae7588 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Mon, 29 Jun 2020 11:32:51 -0700 Subject: [PATCH] yet more record name validation --- modules/database/src/ioc/dbStatic/dbLexRoutines.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/database/src/ioc/dbStatic/dbLexRoutines.c b/modules/database/src/ioc/dbStatic/dbLexRoutines.c index c40e40549..93fd52fc3 100644 --- a/modules/database/src/ioc/dbStatic/dbLexRoutines.c +++ b/modules/database/src/ioc/dbStatic/dbLexRoutines.c @@ -1065,15 +1065,12 @@ int dbRecordNameValidate(const char *name) for(; *pos; i++, pos++) { char c = *pos; if(i==0) { - /* first charactor restrictions */ - if(c >= '0' && c <= '9') { - errlogPrintf("Warning: Record name '%s' should not begin with a number\n", name); - - } else if(c=='-' || c=='+' || c=='[' || c=='{') { + /* first character restrictions */ + if(c=='-' || c=='+' || c=='[' || c=='{') { errlogPrintf("Warning: Record name '%s' should not begin with '%c'\n", name, c); } } - /* any charactor restrictions */ + /* any character restrictions */ if(c < ' ') { errlogPrintf("Warning: Record name '%s' should not contain non-printable 0x%02u\n", name, (unsigned)c);