]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
GNU shell utilities SHELLUTILS SHELLUTILS-1_10q
authorJim Meyering <jim@meyering.net>
Sat, 8 Oct 1994 00:26:58 +0000 (00:26 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 8 Oct 1994 00:26:58 +0000 (00:26 +0000)
lib/getdate.y
lib/pathmax.h

index e77cc1f62d6d3adc126639f41e6d7aa7f48ba37b..77d63a9e9e19d5aa9a263bcf788472159545303f 100644 (file)
@@ -962,11 +962,13 @@ main (ac, av)
     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)
index b3e4656071f6d9fcf96a5cc54b1f2ffe69eb3033..00fb0b514e4491b8c0f137fa555b6fa13fcc6cc7 100644 (file)
@@ -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 <sys/param.h>
 #endif