diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 1995-04-30 19:43:53 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 1995-04-30 19:43:53 +0000 |
| commit | 1ccc95ada5c1d1cd6d1b8c31c8793c181d5ab89c (patch) | |
| tree | 8bea874206e3d5ebddf43f66ee59c688bfb4a03f /gnu/lib/libdialog/kernel.c | |
| parent | 7439966a40c9d6d09c5dba55c87f389991fca16f (diff) | |
Notes
Diffstat (limited to 'gnu/lib/libdialog/kernel.c')
| -rw-r--r-- | gnu/lib/libdialog/kernel.c | 3 |
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; |
