[bugfix][critical] heap pollution while symbol allocation
This commit is contained in:
parent
849032ef1a
commit
bda1b93ec2
|
@ -32,6 +32,8 @@ pic_intern_cstr(pic_state *pic, const char *cstr)
|
|||
strcpy(copy, cstr);
|
||||
kh_key(h, it) = copy;
|
||||
|
||||
kh_val(h, it) = pic->sDEFINE; /* insert dummy */
|
||||
|
||||
sym = (pic_sym *)pic_obj_alloc(pic, sizeof(pic_sym), PIC_TT_SYMBOL);
|
||||
sym->cstr = copy;
|
||||
kh_val(h, it) = sym;
|
||||
|
|
Loading…
Reference in New Issue