summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-02 03:50:53 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-02 03:50:53 +0000
commit6f9dcadf6e46c80bb1f807f88a691cfe388f4f8b (patch)
tree5756b304650334db0189529589f40dcd4beae38c /marshal.c
parentd57bbd48f8d43b512d171f53edc198d3043d933c (diff)
* string.c (rb_str_sum): check was done with false pointer.
[ruby-dev:24383] * string.c (rb_str_sum): string may be altered. [ruby-dev:24381] * eval.c (rb_f_eval): defer pointer retrieval to prevent unsafe sourcefile string modification. [ruby-dev:24373] * io.c (io_read): block string buffer modification during rb_io_fread() by freezing it temporarily. [ruby-dev:24366] * io.c (rb_io_s_popen): mode argument may be altered. [ruby-dev:24375] * file.c (rb_file_s_basename): ext argument may be altered. [ruby-dev:24377] * enum.c (enum_sort_by): use NODE instead of 2 element arrays. [ruby-dev:24378] * string.c (rb_str_chomp_bang): StringValue() may change the receiver. [ruby-dev:24371] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/marshal.c b/marshal.c
index 90c0788..f4832a4 100644
--- a/marshal.c
+++ b/marshal.c
@@ -437,7 +437,7 @@ w_ivar(tbl, arg)
{
if (tbl) {
w_long(tbl->num_entries, arg->arg);
- st_foreach(tbl, w_obj_each, (st_data_t)arg);
+ st_foreach_safe(tbl, w_obj_each, (st_data_t)arg);
}
else {
w_long(0, arg->arg);
@@ -621,7 +621,7 @@ w_object(obj, arg, limit)
w_byte(TYPE_HASH_DEF, arg);
}
w_long(RHASH(obj)->tbl->num_entries, arg);
- st_foreach(RHASH(obj)->tbl, hash_each, (st_data_t)&c_arg);
+ rb_hash_foreach(obj, hash_each, (st_data_t)&c_arg);
if (!NIL_P(RHASH(obj)->ifnone)) {
w_object(RHASH(obj)->ifnone, arg, limit);
}