[前][次][番号順一覧][スレッド一覧]

ruby-changes:40998

From: nobu <ko1@a...>
Date: Sun, 13 Dec 2015 18:26:37 +0900 (JST)
Subject: [ruby-changes:40998] nobu:r53077 (trunk): tkutil.c: check arg

nobu	2015-12-13 18:26:30 +0900 (Sun, 13 Dec 2015)

  New Revision: 53077

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53077

  Log:
    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.

  Modified files:
    trunk/ChangeLog
    trunk/ext/tk/tkutil/tkutil.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 53076)
+++ ChangeLog	(revision 53077)
@@ -1,4 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
-Sun Dec 13 18:25:16 2015  Nobuyoshi Nakada  <nobu@r...>
+Sun Dec 13 18:26:31 2015  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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
Index: ext/tk/tkutil/tkutil.c
===================================================================
--- ext/tk/tkutil/tkutil.c	(revision 53076)
+++ ext/tk/tkutil/tkutil.c	(revision 53077)
@@ -804,6 +804,7 @@ tk_hash_kv(argc, argv, self) https://github.com/ruby/ruby/blob/trunk/ext/tk/tkutil/tkutil.c#L804
     switch(argc) {
     case 3:
         ary = argv[2];
+	Check_Type(ary, T_ARRAY);
     case 2:
         enc_flag = argv[1];
     case 1:

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]