svn commit: samba r8253 - in branches/SAMBA_4_0/source/lib/ejs: .

tridge at samba.org tridge at samba.org
Sat Jul 9 05:23:48 GMT 2005


Author: tridge
Date: 2005-07-09 05:23:47 +0000 (Sat, 09 Jul 2005)
New Revision: 8253

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8253

Log:
fixed two crash bugs in ejs. I will send these fixes off to the appweb guys soon.


Modified:
   branches/SAMBA_4_0/source/lib/ejs/ejsParser.c
   branches/SAMBA_4_0/source/lib/ejs/var.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ejs/ejsParser.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ejs/ejsParser.c	2005-07-09 04:58:15 UTC (rev 8252)
+++ branches/SAMBA_4_0/source/lib/ejs/ejsParser.c	2005-07-09 05:23:47 UTC (rev 8253)
@@ -1555,6 +1555,7 @@
 		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 @@
 				 *	Convert the RHS to a string
 				 */
 				mprVarToString(&str, MPR_MAX_STRING, 0, rhs);
+				rhs->allocatedVar = 0;
 				mprDestroyVar(rhs);
 				*rhs = mprCreateStringVar(str, 1);
 				mprFree(str);

Modified: branches/SAMBA_4_0/source/lib/ejs/var.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ejs/var.c	2005-07-09 04:58:15 UTC (rev 8252)
+++ branches/SAMBA_4_0/source/lib/ejs/var.c	2005-07-09 05:23:47 UTC (rev 8253)
@@ -602,7 +602,8 @@
 
 	for (prop = getObjChain(obj->properties, property); prop; 
 			prop = prop->forw) {
-		if (prop->name[0] == property[0] && strcmp(prop->name, property) == 0) {
+		if (prop->name && 
+			prop->name[0] == property[0] && strcmp(prop->name, property) == 0) {
 			break;
 		}
 	}



More information about the samba-cvs mailing list