# HG changeset patch # User Jim Meyering # Date 781576018 0 # Node ID 5483ac58c1d739f582ff9c98a052147b7d90a2a4 # Parent 08db9279f1ba37d3934627b478b536a0cf6c5822 GNU shell utilities diff --git a/lib/getdate.y b/lib/getdate.y --- 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) diff --git a/lib/pathmax.h b/lib/pathmax.h --- a/lib/pathmax.h +++ b/lib/pathmax.h @@ -38,7 +38,7 @@ #endif /* Don't include sys/param.h if it already has been. */ -#if defined(HAVE_SYS_PATH_MAX_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN) +#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN) #include #endif