diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-06-20 14:52:45 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-06-20 14:52:45 +0000 |
commit | ff75ab3e3cd76b1b457661edf6b20661d45c8d78 (patch) | |
tree | a294a67d15b5f342105b117b547d32d89ed77b6e /ext/tcltklib | |
parent | f289fddace1c84075e6794e24a3d46aee6b35d69 (diff) |
tcltklib.c :
* Tk interpreter returns TAINTED strings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tcltklib')
-rw-r--r-- | ext/tcltklib/tcltklib.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c index 06322b54f1..9f6f54b5cc 100644 --- a/ext/tcltklib/tcltklib.c +++ b/ext/tcltklib/tcltklib.c @@ -635,7 +635,8 @@ ip_eval(self, str) DUMP2("(TCL_Eval result) %d", ptr->return_value); /* pass back the result (as string) */ - return(rb_str_new2(ptr->ip->result)); + /* return(rb_str_new2(ptr->ip->result)); */ + return(rb_tainted_str_new2(ptr->ip->result)); } @@ -665,7 +666,8 @@ ip_toUTF8(self, str, encodename) Tcl_DStringInit(&dstr); Tcl_DStringFree(&dstr); Tcl_ExternalToUtfDString(encoding,buf,strlen(buf),&dstr); - str = rb_str_new2(Tcl_DStringValue(&dstr)); + /* str = rb_str_new2(Tcl_DStringValue(&dstr)); */ + str = rb_tainted_str_new2(Tcl_DStringValue(&dstr)); Tcl_FreeEncoding(encoding); Tcl_DStringFree(&dstr); @@ -699,7 +701,8 @@ ip_fromUTF8(self, str, encodename) Tcl_DStringInit(&dstr); Tcl_DStringFree(&dstr); Tcl_UtfToExternalDString(encoding,buf,strlen(buf),&dstr); - str = rb_str_new2(Tcl_DStringValue(&dstr)); + /* str = rb_str_new2(Tcl_DStringValue(&dstr)); */ + str = rb_tainted_str_new2(Tcl_DStringValue(&dstr)); Tcl_FreeEncoding(encoding); Tcl_DStringFree(&dstr); @@ -796,7 +799,8 @@ ip_invoke_real(argc, argv, obj) } /* pass back the result (as string) */ - return rb_str_new2(ptr->ip->result); + /* return rb_str_new2(ptr->ip->result); */ + return rb_tainted_str_new2(ptr->ip->result); } VALUE |