diff options
| author | grischka <grischka> | 2013-01-31 11:29:45 +0100 |
|---|---|---|
| committer | grischka <grischka> | 2013-01-31 13:23:19 +0100 |
| commit | 2f6b8469cc27c0679460a2b70a35f8ba830281fc (patch) | |
| tree | e5d8d10c8666dbfc0b7df912d307588f4eef8056 /tccpe.c | |
| parent | 370547a550e73d91e95cac6145a7df7947025bb0 (diff) | |
| download | tinycc-2f6b8469cc27c0679460a2b70a35f8ba830281fc.tar.gz tinycc-2f6b8469cc27c0679460a2b70a35f8ba830281fc.tar.bz2 | |
safety: replace occurrences of strcpy by pstrcpy
Diffstat (limited to 'tccpe.c')
| -rw-r--r-- | tccpe.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -663,7 +663,7 @@ static int pe_write(struct pe_info *pe) } } - strcpy((char*)psh->Name, sh_name); + pstrcpy((char*)psh->Name, sizeof psh->Name, sh_name); psh->Characteristics = pe_sec_flags[si->cls]; psh->VirtualAddress = addr; @@ -933,7 +933,7 @@ static void pe_build_exports(struct pe_info *pe) #if 1 /* automatically write exports to <output-filename>.def */ - strcpy(buf, pe->filename); + pstrcpy(buf, sizeof buf, pe->filename); strcpy(tcc_fileextension(buf), ".def"); op = fopen(buf, "w"); if (NULL == op) { @@ -1598,7 +1598,7 @@ static int pe_load_def(TCCState *s1, FILE *fp) case 0: if (0 != strnicmp(p, "LIBRARY", 7)) goto quit; - strcpy(dllname, trimfront(p+7)); + pstrcpy(dllname, sizeof dllname, trimfront(p+7)); ++state; continue; |
