summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-13 09:26:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-13 09:26:30 +0000
commitcdaa94eab443919ecac3484c0f567eca773d686e (patch)
tree62360b3b9ef04e6e1114fa6b9b747c402fb47298
parent62539b49a7aebd4a948fef30461841e123bad461 (diff)
tkutil.c: check arg
* ext/tk/tkutil/tkutil.c (tk_hash_kv): check types of array argument. reported by Marcin 'Icewall' Noga of Cisco Talos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/tk/tkutil/tkutil.c1
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index acc2d63..6dc7971 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
-Sun Dec 13 18:25:16 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Dec 13 18:26:31 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/tk/tkutil/tkutil.c (tk_hash_kv): check types of array
+ argument. reported by Marcin 'Icewall' Noga of Cisco Talos.
* ext/tk/tkutil/tkutil.c (cbsubst_table_setup): check length of
argument arrays for each access, as callback methods can modify
diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c
index fc9ed2d..147dfa2 100644
--- a/ext/tk/tkutil/tkutil.c
+++ b/ext/tk/tkutil/tkutil.c
@@ -804,6 +804,7 @@ tk_hash_kv(argc, argv, self)
switch(argc) {
case 3:
ary = argv[2];
+ Check_Type(ary, T_ARRAY);
case 2:
enc_flag = argv[1];
case 1: