From 704beb71768cdaa2448da6edfa219b4a7bf862f1 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 30 Mar 2013 11:18:44 -0700 Subject: Replace strcpy+strcat pairs with snprintf calls Signed-off-by: Alan Coopersmith --- AuLock.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'AuLock.c') 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); /* -- cgit v1.2.3