summaryrefslogtreecommitdiff
path: root/bin/ksh
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-06 23:39:18 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-06 23:39:18 +0000
commit9bf2df7ea3567fc8a48e36d3f64988d220cd69bd (patch)
tree13e827cc362478366e54cc60fb7a7f487624be75 /bin/ksh
parent383f1657fdcb5d52c634d04443552ab76265e2b9 (diff)
strlcat; ok from various people
Diffstat (limited to 'bin/ksh')
-rw-r--r--bin/ksh/history.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/ksh/history.c b/bin/ksh/history.c
index 4ec7d6b2e8a..d7432d7d77d 100644
--- a/bin/ksh/history.c
+++ b/bin/ksh/history.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: history.c,v 1.17 2003/02/28 09:45:09 jmc Exp $ */
+/* $OpenBSD: history.c,v 1.18 2003/04/06 23:39:17 deraadt Exp $ */
/*
* command history
@@ -93,8 +93,9 @@ c_fc(wp)
if (strcmp(p, "-") == 0)
sflag++;
else {
- editor = str_nsave(p, strlen(p) + 4, ATEMP);
- strcat(editor, " $_");
+ size_t len = strlen(p) + 4;
+ editor = str_nsave(p, len, ATEMP);
+ strlcat(editor, " $_", len);
}
break;
case 'g': /* non-at&t ksh */