mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
variable.c (mrb_exc_const_get): E_XXX_ERROR should not call const_missing
As #6359 pointed out, calling const_missing hook from E_XXX_ERROR (that calls mrb_exc_get_id()) can be an attack vector. Since E_XXX_ERROR is supposed to be a defined error class, we think that the situation where it is undefined and the const_missing hook is called should be detected as an error; fix #6359
This commit is contained in:
@@ -182,6 +182,7 @@ mrb_value mrb_mod_class_variables(mrb_state*, mrb_value);
|
||||
mrb_value mrb_mod_cv_get(mrb_state *mrb, struct RClass * c, mrb_sym sym);
|
||||
mrb_bool mrb_mod_cv_defined(mrb_state *mrb, struct RClass * c, mrb_sym sym);
|
||||
mrb_bool mrb_ident_p(const char *s, mrb_int len);
|
||||
mrb_value mrb_exc_const_get(mrb_state *mrb, mrb_sym sym);
|
||||
|
||||
/* GC functions */
|
||||
void mrb_gc_mark_gv(mrb_state*);
|
||||
|
||||
Reference in New Issue
Block a user