diff options
Diffstat (limited to 'source4/lib/appweb')
-rw-r--r-- | source4/lib/appweb/ejs/ejsParser.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/lib/appweb/ejs/ejsParser.c b/source4/lib/appweb/ejs/ejsParser.c index 452e7fde8f..e7c44f4d6c 100644 --- a/source4/lib/appweb/ejs/ejsParser.c +++ b/source4/lib/appweb/ejs/ejsParser.c @@ -2003,10 +2003,11 @@ static int evalFunction(Ejs *ep, MprVar *obj, int flags) case MPR_TYPE_STRING_CFUNCTION: if (actualArgs->used > 0) { - argBuf = mprMalloc(actualArgs->used * sizeof(char*)); + argBuf = mprMalloc((1+actualArgs->used) * sizeof(char*)); for (i = 0; i < actualArgs->used; i++) { mprVarToString(&argBuf[i], MPR_MAX_STRING, 0, argValues[i]); } + argBuf[i] = NULL; } else { argBuf = 0; } |