diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-28 05:53:05 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-28 05:53:05 +0000 |
commit | 0c58f69791240b86f709c1d49a66f47d93b2a299 (patch) | |
tree | 68fbfed7d7bf92e793c61c86504e6b24c506f718 /ext | |
parent | c8b3f1b470e343e7408ab5883f046b1056d94ccc (diff) | |
download | ruby-0c58f69791240b86f709c1d49a66f47d93b2a299.tar.gz |
tkutil.c: check type
* ext/tk/tkutil/tkutil.c (cbsubst_get_subst_key): ensure the
result type of a method call to be an array before accessing by
RARRAY macros.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/tk/tkutil/tkutil.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c index 9fcae0e082..7aecc5c591 100644 --- a/ext/tk/tkutil/tkutil.c +++ b/ext/tk/tkutil/tkutil.c @@ -1461,6 +1461,7 @@ cbsubst_get_subst_key(self, str) char *buf, *ptr, *key; list = rb_funcall(cTclTkLib, ID_split_tklist, 1, str); + Check_Type(list, T_ARRAY); len = RARRAY_LEN(list); inf = cbsubst_get_ptr(self); |