1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

tcltklib.c: check argument

* ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and
  length.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-08-02 01:27:31 +00:00
parent 03fcd385b2
commit a2b8925a94

View file

@ -7745,7 +7745,8 @@ ip_cancel_eval_core(interp, msg, flag)
if (NIL_P(msg)) {
msg_obj = NULL;
} else {
msg_obj = Tcl_NewStringObj(RSTRING_PTR(msg), RSTRING_LEN(msg));
char *s = StringValuePtr(msg);
msg_obj = Tcl_NewStringObj(s, RSTRING_LENINT(msg));
Tcl_IncrRefCount(msg_obj);
}