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
This commit is contained in:
parent
c8b3f1b470
commit
0c58f69791
@ -1461,6 +1461,7 @@ cbsubst_get_subst_key(self, str)
|
|||||||
char *buf, *ptr, *key;
|
char *buf, *ptr, *key;
|
||||||
|
|
||||||
list = rb_funcall(cTclTkLib, ID_split_tklist, 1, str);
|
list = rb_funcall(cTclTkLib, ID_split_tklist, 1, str);
|
||||||
|
Check_Type(list, T_ARRAY);
|
||||||
len = RARRAY_LEN(list);
|
len = RARRAY_LEN(list);
|
||||||
|
|
||||||
inf = cbsubst_get_ptr(self);
|
inf = cbsubst_get_ptr(self);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user