Skip to content

Commit

Permalink
* enum.c (rb_enum_join): should propagate taint to the return
Browse files Browse the repository at this point in the history
  value.  the change was overridden by r23967.  [ruby-core:24176]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
matz committed Jul 7, 2009
1 parent 450f784 commit 9041ac4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Tue Jul 7 12:47:28 2009 Yukihiro Matsumoto <matz@ruby-lang.org>

* enum.c (rb_enum_join): should propagate taint to the return
value. the change was overridden by r23967. [ruby-core:24176]

Tue Jul 7 11:56:52 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>

* gc.c (GC_PROF_SET_MALLOC_INFO, GC_PROF_SET_HEAP_INFO): simplified.
Expand Down
6 changes: 5 additions & 1 deletion enum.c
Original file line number Diff line number Diff line change
Expand Up @@ -1825,10 +1825,14 @@ VALUE
rb_enum_join(VALUE obj, VALUE sep)
{
VALUE args[2];

args[0] = 0;
args[1] = sep;
rb_block_call(obj, id_each, 0, 0, join_i, (VALUE)args);
return args[0] ? args[0] : rb_str_new(0, 0);
if (!args[0]) args[0] = rb_str_new(0, 0);
OBJ_INFECT(args[0], obj);

return args[0];
}

/*
Expand Down

0 comments on commit 9041ac4

Please sign in to comment.