cvsdist a34e68
--- at-3.1.7/atd.c.tyop	Wed Mar  1 14:32:47 2000
cvsdist a34e68
+++ at-3.1.7/atd.c	Wed Mar  1 14:34:52 2000
cvsdist a34e68
@@ -247,7 +247,7 @@
cvsdist a34e68
 	     "aborting", jobno, filename);
cvsdist a34e68
 
cvsdist a34e68
     if (buf.st_nlink > 2) {
cvsdist a34e68
-	perr("Someboy is trying to run a linked script for job %8lu (%.500s)",
cvsdist a34e68
+	perr("Somebody is trying to run a linked script for job %8lu (%.500s)",
cvsdist a34e68
 	     filename);
cvsdist a34e68
     }
cvsdist a34e68
     if ((fflags = fcntl(fd_in, F_GETFD)) < 0)
cvsdist a34e68
@@ -493,6 +493,7 @@
cvsdist a34e68
 		 * Let's remove the lockfile and reschedule.
cvsdist a34e68
 		 */
cvsdist a34e68
 		strncpy(lock_name, dirent->d_name, sizeof(lock_name));
cvsdist a34e68
+		lock_name[sizeof(lock_name)-1] = '\0';
cvsdist a34e68
 		lock_name[0] = '=';
cvsdist a34e68
 		unlink(lock_name);
cvsdist a34e68
 		next_job = now;
cvsdist a34e68
@@ -500,7 +501,7 @@
cvsdist a34e68
 	    continue;
cvsdist a34e68
 	}
cvsdist a34e68
 	/* There's a job for later.  Note its execution time if it's
cvsdist a34e68
-	 * the earlierst so far.
cvsdist a34e68
+	 * the earliest so far.
cvsdist a34e68
 	 */
cvsdist a34e68
 	if (run_time > now) {
cvsdist a34e68
 	    if (next_job > run_time) {
cvsdist a34e68
@@ -518,6 +519,7 @@
cvsdist a34e68
 	    run_batch++;
cvsdist a34e68
 	    if (strcmp(batch_name, dirent->d_name) > 0) {
cvsdist a34e68
 		strncpy(batch_name, dirent->d_name, sizeof(batch_name));
cvsdist a34e68
+		batch_name[sizeof(batch_name)-1] = '\0';
cvsdist a34e68
 		batch_uid = buf.st_uid;
cvsdist a34e68
 		batch_gid = buf.st_gid;
cvsdist a34e68
 		batch_queue = queue;
cvsdist a34e68
@@ -553,7 +555,7 @@
cvsdist a34e68
 int
cvsdist a34e68
 main(int argc, char *argv[])
cvsdist a34e68
 {
cvsdist a34e68
-/* Browse through  ATJOB_DIR, checking all the jobfiles wether they should
cvsdist a34e68
+/* Browse through  ATJOB_DIR, checking all the jobfiles whether they should
cvsdist a34e68
  * be executed and or deleted. The queue is coded into the first byte of
cvsdist a34e68
  * the job filename, the date (in minutes since Eon) as a hex number in the
cvsdist a34e68
  * following eight bytes, followed by a dot and a serial number.  A file