mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Kernel#initialize should not break existing mt; fix #3397
This issue was reported by https://hackerone.com/icanthack The solution is suggested by @clayton-shopify.
This commit is contained in:
+3
-1
@@ -915,7 +915,9 @@ boot_defclass(mrb_state *mrb, struct RClass *super)
|
||||
static void
|
||||
boot_initmod(mrb_state *mrb, struct RClass *mod)
|
||||
{
|
||||
mod->mt = kh_init(mt, mrb);
|
||||
if (!mod->mt) {
|
||||
mod->mt = kh_init(mt, mrb);
|
||||
}
|
||||
}
|
||||
|
||||
static struct RClass*
|
||||
|
||||
Reference in New Issue
Block a user