diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ksh/history.c | 7 |
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 */ |