git.samba.org
/
bbaumbach
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
325edaa
)
r8599: null terminate the argv list in string C functions
author
Andrew Tridgell
<tridge@samba.org>
Tue, 19 Jul 2005 11:52:50 +0000
(11:52 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 18:29:43 +0000
(13:29 -0500)
(This used to be commit
cabf638a31ab5f9b0e62e085d844d615c597bc2f
)
source4/lib/appweb/ejs/ejsParser.c
patch
|
blob
|
history
diff --git
a/source4/lib/appweb/ejs/ejsParser.c
b/source4/lib/appweb/ejs/ejsParser.c
index 452e7fde8f376b671fbf6c8b19470181c3c740dc..e7c44f4d6c62137f75b86f2e786b55d72b990638 100644
(file)
--- 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;
}