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:
parent
03fcd385b2
commit
a2b8925a94
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue