Correct a small error in parse.y, which causes the reading of unassigned memory (triggers an error when address sanitizer is active)
MODIFY
mrbgems/mruby-compiler/core/parse.y
mrbgems/mruby-compiler/core/parse.y
@@ -5723,7 +5723,7 @@ mrb_parser_set_filename(struct mrb_parser_state *p, const char *f)
new_table = (mrb_sym*)parser_palloc(p, sizeof(mrb_sym) * p->filename_table_length);
if (p->filename_table) {
- memmove(new_table, p->filename_table, sizeof(mrb_sym) * p->filename_table_length);
+ memmove(new_table, p->filename_table, sizeof(mrb_sym) * p->current_filename_index);
}
p->filename_table = new_table;
p->filename_table[p->filename_table_length - 1] = sym;

Correct a small error in parse.y, which causes the reading of unassigned memory (triggers an error when address sanitizer is active)