aboutsummaryrefslogtreecommitdiffstats
path: root/marshal.c
diff options
context:
space:
mode:
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 6639e03f45..054b2aad0c 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;
}