diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-02 01:27:31 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-02 01:27:31 +0000 |
commit | 7a3912102c53382c10e86046f5ebc68c61671aba (patch) | |
tree | 77c45004c8a85b8b44d372720c6d7670a0cddc33 /ext/tk | |
parent | 5aa1b0a52a63afa2004d8ba44ff980f4ce393c21 (diff) | |
download | ruby-7a3912102c53382c10e86046f5ebc68c61671aba.tar.gz |
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
Diffstat (limited to 'ext/tk')
-rw-r--r-- | ext/tk/tcltklib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c index afcee3b072..e305c1327c 100644 --- a/ext/tk/tcltklib.c +++ b/ext/tk/tcltklib.c @@ -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); } |