summaryrefslogtreecommitdiff
path: root/source4/lib/ejs/ejsParser.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-09 05:23:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:19:26 -0500
commit514731b0ee7d8f9c79cbc88672a7957b7ba1eacd (patch)
treeb40b83c31773b869aa5d3fa9291fac50238fa9ed /source4/lib/ejs/ejsParser.c
parente75c7ff39fadb115de7bb5a26e2bb621dca22768 (diff)
downloadsamba-514731b0ee7d8f9c79cbc88672a7957b7ba1eacd.tar.gz
samba-514731b0ee7d8f9c79cbc88672a7957b7ba1eacd.tar.bz2
samba-514731b0ee7d8f9c79cbc88672a7957b7ba1eacd.zip
r8253: fixed two crash bugs in ejs. I will send these fixes off to the appweb guys soon.
(This used to be commit 3fe83b48c3fe4cdc1e7ec0271e08f7bd77e90de9)
Diffstat (limited to 'source4/lib/ejs/ejsParser.c')
-rw-r--r--source4/lib/ejs/ejsParser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/lib/ejs/ejsParser.c b/source4/lib/ejs/ejsParser.c
index 57cb569cdb..72b0889c55 100644
--- a/source4/lib/ejs/ejsParser.c
+++ b/source4/lib/ejs/ejsParser.c
@@ -1555,6 +1555,7 @@ static int evalExpr(Ejs *ep, MprVar *lhs, int rel, MprVar *rhs)
if (lhs->type == MPR_TYPE_STRING) {
if (isdigit((int) lhs->string[0])) {
num = mprVarToNumber(lhs);
+ lhs->allocatedVar = 0;
mprDestroyVar(lhs);
*lhs = mprCreateNumberVar(num);
/* Examine further below */
@@ -1564,6 +1565,7 @@ static int evalExpr(Ejs *ep, MprVar *lhs, int rel, MprVar *rhs)
* Convert the RHS to a string
*/
mprVarToString(&str, MPR_MAX_STRING, 0, rhs);
+ rhs->allocatedVar = 0;
mprDestroyVar(rhs);
*rhs = mprCreateStringVar(str, 1);
mprFree(str);