From 0c58f69791240b86f709c1d49a66f47d93b2a299 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 28 May 2015 05:53:05 +0000 Subject: 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 --- ext/tk/tkutil/tkutil.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ext/tk/tkutil') 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); -- cgit v1.2.3