summaryrefslogtreecommitdiff
path: root/AuLock.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-03-30 11:18:44 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-03-30 11:18:44 -0700
commit704beb71768cdaa2448da6edfa219b4a7bf862f1 (patch)
tree31646078d37ccee89d9bb89019ae3cad7e58559f /AuLock.c
parent3038a87edce31ad2895431f7cfdc96a33fc70e02 (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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/AuLock.c b/AuLock.c
index b9859f1..ce15f25 100644
--- a/AuLock.c
+++ b/AuLock.c
@@ -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);
/*