[bugfix][critical] heap pollution while symbol allocation

This commit is contained in:
Yuichi Nishiwaki 2015-06-28 01:47:56 +09:00
parent 849032ef1a
commit bda1b93ec2
1 changed files with 2 additions and 0 deletions

View File

@ -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;