Commit f4dbcb51 authored by deuce's avatar deuce
Browse files

Call strdup() on the new environment string to ensure it doesn't change at

a later date.
parent 89da8503
......@@ -607,7 +607,7 @@ js_putenv(JSContext *cx, uintN argc, jsval *arglist)
return(JS_TRUE);
}
JS_SET_RVAL(cx, arglist, BOOLEAN_TO_JSVAL(putenv(p)==0));
JS_SET_RVAL(cx, arglist, BOOLEAN_TO_JSVAL(putenv(strdup(p))==0));
return(JS_TRUE);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment