diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-06-16 01:03:15 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-06-16 18:25:35 +0900 |
commit | 26c179d7e7e7ae0eb21050659c3e8778358230ab (patch) | |
tree | bc1aef0169e3f849295e7fdca4b1371c3b7ae137 /gc.c | |
parent | 19cabe8b09d92d033c244f32ff622b8e513375f1 (diff) |
Check argument to ObjectSpace._id2ref
Ensure that the argument is an Integer or implicitly convert to,
before dereferencing as a Bignum. Addressed a regression in
b99833baec2.
Reported by u75615 at https://hackerone.com/reports/898614
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -3716,6 +3716,7 @@ id2ref(VALUE objid) VALUE orig; void *p0; + objid = rb_to_int(objid); if (FIXNUM_P(objid) || rb_big_size(objid) <= SIZEOF_VOIDP) { ptr = NUM2PTR(objid); if (ptr == Qtrue) return Qtrue; |