summaryrefslogtreecommitdiff
path: root/usr.bin/less
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2011-09-21 20:57:43 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2011-09-21 20:57:43 +0000
commitfefd24774ab635172d1150060fc7c362900cabb2 (patch)
treeff04a6f3f2de53f87337f4f203dfddc6257aa009 /usr.bin/less
parent9fe1413d2fcffb82f15d0b258d5b1b48bb60df2c (diff)
Fix mismerged copyright notice
Use strlcpy() not snprintf() to copy a simple string. OK deraadt@
Diffstat (limited to 'usr.bin/less')
-rw-r--r--usr.bin/less/charset.c4
-rw-r--r--usr.bin/less/lessecho.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/less/charset.c b/usr.bin/less/charset.c
index 2f38209486a..71ba3052d8b 100644
--- a/usr.bin/less/charset.c
+++ b/usr.bin/less/charset.c
@@ -428,7 +428,7 @@ prchar(c)
if ((c < 128 || !utf_mode) && !control_char(c))
SNPRINTF1(buf, sizeof(buf), "%c", (int) c);
else if (c == ESC)
- snprintf(buf, sizeof(buf), "ESC");
+ strlcpy(buf, "ESC", sizeof(buf));
#if IS_EBCDIC_HOST
else if (!binary_char(c) && c < 64)
SNPRINTF1(buf, sizeof(buf), "^%c",
@@ -1216,7 +1216,7 @@ prchar(c)
if (!iscntrl(c))
snprintf(buf, sizeof(buf), "%c", c);
else if (c == ESC)
- snprintf(buf, sizeof(buf), "ESC");
+ strlcpy(buf, "ESC", sizeof(buf));
else if (c < 128 && !iscntrl(c ^ 0100))
snprintf(buf, sizeof(buf), "^%c", c ^ 0100);
else
diff --git a/usr.bin/less/lessecho.c b/usr.bin/less/lessecho.c
index 0c766f073bb..4078323dc85 100644
--- a/usr.bin/less/lessecho.c
+++ b/usr.bin/less/lessecho.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 1984-2002 Mark Nudelman
+ * Copyright (C) 1984-2011 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
@@ -28,7 +28,7 @@
#include "less.h"
-static char *version = "$Revision: 1.2 $";
+static char *version = "$Revision: 1.3 $";
static int quote_all = 0;
static char openquote = '"';