Commit af3d5d6c authored by Carlo Prelz's avatar Carlo Prelz

Correct a small error in parse.y, which causes the reading of unassigned...

Correct a small error in parse.y, which causes the reading of unassigned memory (triggers an error when address sanitizer is active)
parent 80e03f3f
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment