summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-16 22:18:12 (GMT)
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-16 22:18:12 (GMT)
commitc9165d06441fcb126d1d36a9b2fb123d404d2001 (patch)
treed5b96b635b9b3a7fe14f00a7660a7e1fd7146c7e /marshal.c
parente91e50d05eeb82ae6858b629f3e1d56a03503d79 (diff)
* marshal.c (r_object0): raise ArgumentError when linking to undefined
object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/marshal.c b/marshal.c
index 6639e03..054b2aa 100644
--- a/marshal.c
+++ b/marshal.c
@@ -1965,6 +1965,11 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
rb_raise(rb_eArgError, "dump format error(0x%x)", type);
break;
}
+
+ if (v == Qundef) {
+ rb_raise(rb_eArgError, "dump format error (bad link)");
+ }
+
return v;
}