From 807dc7c8de2dcb0365c15b9c2a43ad0c195513dd Mon Sep 17 00:00:00 2001 From: Roy Date: Thu, 6 Jun 2013 09:26:31 +0800 Subject: [PATCH] tccpe: pstrcpy() will truncate .stabstr section name, use strncpy() instead. --- tccpe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tccpe.c b/tccpe.c index f7a200ca..72c1572c 100644 --- a/tccpe.c +++ b/tccpe.c @@ -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; -- 2.11.4.GIT