Skip to content
Snippets Groups Projects
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
Branches
Tags
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment