summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-15 14:18:43 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-15 14:18:43 +0000
commit9a1effadba37bb18aece8a6d34141aaf857292bd (patch)
treefa9d1f06e5142e1143e926c2ef92afd496a7ecfa /marshal.c
parentd834f1b537d94edd942a8393101f2a06264c1098 (diff)
merge revision(s) 16569:
* marshal.c (marshal_load): should initialize arg.data used for reentrant check. [ruby-dev:34837] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/marshal.c b/marshal.c
index 0c991fab98..d714f65122 100644
--- a/marshal.c
+++ b/marshal.c
@@ -89,7 +89,7 @@ reentrant_check(obj, sym)
VALUE obj;
ID sym;
{
- if (RBASIC(obj)->klass) {
+ if (obj && RBASIC(obj)->klass) {
rb_raise(rb_eRuntimeError, "%s reentered", rb_id2name(sym));
}
}
@@ -1434,6 +1434,7 @@ marshal_load(argc, argv)
}
arg.src = port;
arg.offset = 0;
+ arg.data = 0;
major = r_byte(&arg);
minor = r_byte(&arg);