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

ruby-changes:35429

From: nobu <ko1@a...>
Date: Wed, 10 Sep 2014 17:05:15 +0900 (JST)
Subject: [ruby-changes:35429] nobu:r47511 (trunk): pack.c: no nil.taint

nobu	2014-09-10 17:04:59 +0900 (Wed, 10 Sep 2014)

  New Revision: 47511

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

  Log:
    pack.c: no nil.taint
    
    * pack.c (pack_pack): nil is not taintable.

  Modified files:
    trunk/pack.c
Index: pack.c
===================================================================
--- pack.c	(revision 47510)
+++ pack.c	(revision 47511)
@@ -870,12 +870,12 @@ pack_pack(VALUE ary, VALUE fmt) https://github.com/ruby/ruby/blob/trunk/pack.c#L870
 		}
 		else {
 		    t = StringValuePtr(from);
+		    rb_obj_taint(from);
 		}
 		if (!associates) {
 		    associates = rb_ary_new();
 		}
 		rb_ary_push(associates, from);
-		rb_obj_taint(from);
 		rb_str_buf_cat(res, (char*)&t, sizeof(char*));
 	    }
 	    break;

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

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