X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fview.c;h=76a88a3096aeea8ac99f8b4721e3198048f724ae;hp=6a3c75072767a26029260d380330a0f4791396d7;hb=938680fa3bc29d2a086031a2f648dfd6cadcb51e;hpb=925cd3b851aa2c58529dfaba8ed2c727e718a1e0 diff --git a/test/view.c b/test/view.c index 6a3c7507..76a88a30 100644 --- a/test/view.c +++ b/test/view.c @@ -50,7 +50,7 @@ * scroll operation worked, and the refresh() code only had to do a * partial repaint. * - * $Id: view.c,v 1.88 2012/12/01 23:19:49 tom Exp $ + * $Id: view.c,v 1.89 2012/12/29 22:38:28 tom Exp $ */ #include @@ -565,7 +565,7 @@ show_all(const char *tag) printw("%.*s", COLS, temp); clrtoeol(); this_time = time((time_t *) 0); - strcpy(temp, ctime(&this_time)); + strncpy(temp, ctime(&this_time), 30); if ((i = (int) strlen(temp)) != 0) { temp[--i] = 0; if (move(0, COLS - i - 2) != ERR)