ruby-changes:32491
From: nobu <ko1@a...>
Date: Sun, 12 Jan 2014 17:11:37 +0900 (JST)
Subject: [ruby-changes:32491] nobu:r44570 (trunk): tcltklib.c: create_ip_exc format argument
nobu 2014-01-12 17:11:32 +0900 (Sun, 12 Jan 2014) New Revision: 44570 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44570 Log: tcltklib.c: create_ip_exc format argument * ext/tk/tcltklib.c (create_ip_exc): format argument must not be a dynamic string, not to contain unescaped %. Modified files: trunk/ext/tk/tcltklib.c Index: ext/tk/tcltklib.c =================================================================== --- ext/tk/tcltklib.c (revision 44569) +++ ext/tk/tcltklib.c (revision 44570) @@ -6628,7 +6628,7 @@ ip_make_safe_core(interp, argc, argv) https://github.com/ruby/ruby/blob/trunk/ext/tk/tcltklib.c#L6628 if (Tcl_MakeSafe(ptr->ip) == TCL_ERROR) { /* return rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip)); */ - return create_ip_exc(interp, rb_eRuntimeError, + return create_ip_exc(interp, rb_eRuntimeError, "%s", Tcl_GetStringResult(ptr->ip)); } @@ -9293,7 +9293,7 @@ ip_get_variable2_core(interp, argc, argv https://github.com/ruby/ruby/blob/trunk/ext/tk/tcltklib.c#L9293 volatile VALUE exc; /* exc = rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip)); */ - exc = create_ip_exc(interp, rb_eRuntimeError, + exc = create_ip_exc(interp, rb_eRuntimeError, "%s", Tcl_GetStringResult(ptr->ip)); /* Tcl_Release(ptr->ip); */ rbtk_release_ip(ptr); @@ -9432,7 +9432,7 @@ ip_set_variable2_core(interp, argc, argv https://github.com/ruby/ruby/blob/trunk/ext/tk/tcltklib.c#L9432 volatile VALUE exc; /* exc = rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip)); */ - exc = create_ip_exc(interp, rb_eRuntimeError, + exc = create_ip_exc(interp, rb_eRuntimeError, "%s", Tcl_GetStringResult(ptr->ip)); /* Tcl_Release(ptr->ip); */ rbtk_release_ip(ptr); @@ -9552,7 +9552,7 @@ ip_unset_variable2_core(interp, argc, ar https://github.com/ruby/ruby/blob/trunk/ext/tk/tcltklib.c#L9552 if (FIX2INT(flag) & TCL_LEAVE_ERR_MSG) { /* return rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip)); */ - return create_ip_exc(interp, rb_eRuntimeError, + return create_ip_exc(interp, rb_eRuntimeError, "%s", Tcl_GetStringResult(ptr->ip)); } return Qfalse; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/