Mercurial > hg > octave-nkf > gnulib-hg
changeset 321:4f4862ac3437
merge with 1.10q
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Sat, 08 Oct 1994 00:41:11 +0000 |
parents | 8650952f4b14 |
children | 380a07905792 |
files | lib/getdate.y |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/getdate.y +++ b/lib/getdate.y @@ -962,11 +962,13 @@ int ac; char *av[]; { - char buff[128]; - time_t d; + char buff[MAX_BUFF_LEN + 1]; + time_t d; (void)printf ("Enter date, or blank line to exit.\n\t> "); (void)fflush (stdout); + + buff[MAX_BUFF_LEN] = 0; while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0]) { d = get_date (buff, (struct timeb *)NULL); if (d == -1)