summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2006-01-23 16:49:49 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2006-01-23 16:49:49 +0000
commit494154ad9ccd2476d398ca1d37a4d8966f17761c (patch)
treebf1bc5adba4bbdb8774245a7bb96f908c9fa6bf4
parent24721aac2aac0cdf4321b00b1b212927d9de426a (diff)
snprintf() -> strlcpy()/strlcat(); OK niallo@.
-rw-r--r--usr.bin/cvs/diff3.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/cvs/diff3.c b/usr.bin/cvs/diff3.c
index 76d01acd083..9ba7978fafc 100644
--- a/usr.bin/cvs/diff3.c
+++ b/usr.bin/cvs/diff3.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff3.c,v 1.12 2006/01/02 08:11:56 xsa Exp $ */
+/* $OpenBSD: diff3.c,v 1.13 2006/01/23 16:49:48 xsa Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
@@ -72,7 +72,7 @@ static const char copyright[] =
#ifndef lint
static const char rcsid[] =
- "$OpenBSD: diff3.c,v 1.12 2006/01/02 08:11:56 xsa Exp $";
+ "$OpenBSD: diff3.c,v 1.13 2006/01/23 16:49:48 xsa Exp $";
#endif /* not lint */
#include "includes.h"
@@ -282,8 +282,11 @@ diff3_internal(int argc, char **argv, const char *fmark, const char *rmark)
if (argc < 5)
return (-1);
- snprintf(f1mark, sizeof(f1mark), "<<<<<<< %s", fmark);
- snprintf(f3mark, sizeof(f3mark), ">>>>>>> %s", rmark);
+ strlcpy(f1mark, "<<<<<<< ", sizeof(f1mark));
+ strlcat(f1mark, fmark, sizeof(f1mark));
+
+ strlcpy(f3mark, ">>>>>>> ", sizeof(f3mark));
+ strlcat(f3mark, rmark, sizeof(f3mark));
increase();
m = readin(argv[0], &d13);