summaryrefslogtreecommitdiff
path: root/gnu/lib
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1995-04-30 19:43:53 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1995-04-30 19:43:53 +0000
commit1ccc95ada5c1d1cd6d1b8c31c8793c181d5ab89c (patch)
tree8bea874206e3d5ebddf43f66ee59c688bfb4a03f /gnu/lib
parent7439966a40c9d6d09c5dba55c87f389991fca16f (diff)
Notes
Diffstat (limited to 'gnu/lib')
-rw-r--r--gnu/lib/libdialog/kernel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/lib/libdialog/kernel.c b/gnu/lib/libdialog/kernel.c
index defb3218bea3..08652feb276f 100644
--- a/gnu/lib/libdialog/kernel.c
+++ b/gnu/lib/libdialog/kernel.c
@@ -174,7 +174,8 @@ void print_autowrap(WINDOW *win, unsigned char *prompt, int height, int width, i
wsetscrreg(win, y, height);
getyx(win, cur_y, cur_x);
- strcpy(tempstr, prompt);
+ strncpy(tempstr, prompt, MAX_LEN);
+ tempstr[MAX_LEN] = '\0';
if ((!rawmode && strstr(tempstr, "\\n") != NULL) ||
(strchr(tempstr, '\n') != NULL)) { /* Prompt contains "\n" or '\n' */
word = tempstr;