tccpe: pstrcpy() will truncate .stabstr section name, use strncpy() instead.

This commit is contained in:
Roy 2013-06-06 09:26:31 +08:00
parent d0c4138ac2
commit 807dc7c8de

View File

@ -663,7 +663,7 @@ static int pe_write(struct pe_info *pe)
}
}
pstrcpy((char*)psh->Name, sizeof psh->Name, sh_name);
strncpy((char*)psh->Name, sh_name, sizeof psh->Name);
psh->Characteristics = pe_sec_flags[si->cls];
psh->VirtualAddress = addr;