Commit 8876c059 authored by cremno's avatar cremno

fix memcpy-param-overlap

parent f0be02fc
......@@ -5466,7 +5466,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) {
memcpy(new_table, p->filename_table, sizeof(mrb_sym) * p->filename_table_length);
memmove(new_table, p->filename_table, sizeof(mrb_sym) * p->filename_table_length);
}
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