use "%s" format specifier for uses of switch_event_add_header that just pass a string to avoid potential issues/exploits"

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4226 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris committed 2007-02-13 04:43:49 +00:00
1 parent f08d0e89c1
commit 07d6f12018
11 files changed
+80 -80

No files matched your search

@@ -185,7 +185,7 @@ static JSBool event_add_header(JSContext *cx, JSObject *obj, uintN argc, jsval *
if (argc > 1) {
char *hname = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
char *hval = JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
switch_event_add_header(eo->event, SWITCH_STACK_BOTTOM, hname, hval);
switch_event_add_header(eo->event, SWITCH_STACK_BOTTOM, hname, "%s", hval);
*rval = BOOLEAN_TO_JSVAL( JS_TRUE );
return JS_TRUE;
}