summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/diff3.c
diff options
context:
space:
mode:
authorxsa <xsa@openbsd.org>2006-01-23 16:49:48 +0000
committerxsa <xsa@openbsd.org>2006-01-23 16:49:48 +0000
commit25d2f2d0f96c42adf6722773737c1eeec0668020 (patch)
treeda3c4ba67397be85a1a3a699cedeedcfc46c2934 /usr.bin/cvs/diff3.c
parentupdate for MII (diff)
downloadwireguard-openbsd-25d2f2d0f96c42adf6722773737c1eeec0668020.tar.xz
wireguard-openbsd-25d2f2d0f96c42adf6722773737c1eeec0668020.zip
snprintf() -> strlcpy()/strlcat(); OK niallo@.
Diffstat (limited to 'usr.bin/cvs/diff3.c')
-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);