diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-03-30 11:18:44 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-03-30 11:18:44 -0700 |
commit | 704beb71768cdaa2448da6edfa219b4a7bf862f1 (patch) | |
tree | 31646078d37ccee89d9bb89019ae3cad7e58559f /AuLock.c | |
parent | 3038a87edce31ad2895431f7cfdc96a33fc70e02 (diff) |
Replace strcpy+strcat pairs with snprintf calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'AuLock.c')
-rw-r--r-- | AuLock.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -55,10 +55,8 @@ long dead) if (strlen (file_name) > 1022) return LOCK_ERROR; - (void) strcpy (creat_name, file_name); - (void) strcat (creat_name, "-c"); - (void) strcpy (link_name, file_name); - (void) strcat (link_name, "-l"); + snprintf (creat_name, sizeof(creat_name), "%s-c", file_name); + snprintf (link_name, sizeof(link_name), "%s-l", file_name); if (stat (creat_name, &statb) != -1) { now = time ((Time_t *) 0); /* |