From e60779f2d89d22c080f55e07b4082205fe0930a9 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Fri, 4 Dec 2015 16:35:35 +0100 Subject: [PATCH] warn if expanded command line is too long for vxWorks --- runScript.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runScript.c b/runScript.c index 233b354..41e99b3 100644 --- a/runScript.c +++ b/runScript.c @@ -113,6 +113,11 @@ int runScript(const char* filename, const char* args) while (isspace(*p)) p++; if (*p == 0 || *p == '#') continue; #ifdef vxWorks + if (strlen(line_exp) >= 120) + { + sprintf("runScript: Line too long (>=120):\n%s\n", line_exp); + return -1; + } status = execute(line_exp); #else status = iocshCmd(line_exp);