summaryrefslogtreecommitdiff
path: root/usr.bin/less
diff options
context:
space:
mode:
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 = '"';