Patch-Source: https://src.fedoraproject.org/rpms/at/raw/f36/f/at-3.2.5-noabort.patch (updated)
--
From 7ca7f064c8034ce1d20e6ce008bbe9a3f8d46129 Mon Sep 17 00:00:00 2001
From: Tomas Mraz <tmraz@fedoraproject.org>
Date: Nov 06 2014 15:16:42 +0000
From: Ondřej Pohořelský <opohorel@redhat.com>
Date: Mar 01 2022 16:30:47 +0000
Subject: make atd less abort prone

diff --git a/atd.c b/atd.c
--- a/atd.c
+++ b/atd.c
@@ -336,8 +336,12 @@ run_file(const char *filename, uid_t uid, gid_t gid)
      */
 
     pid = fork();
-    if (pid == -1)
-	perr("Cannot fork");
+    if (pid == -1) {
+	lerr("Cannot fork for job execution");
+	free(mailname);
+	free(newname);
+	return;
+    }
 
     else if (pid != 0) {
 	free(mailname);
@@ -633,16 +637,20 @@ run_loop()
      * up.
      */
 
-    if (stat(".", &buf) == -1)
-	perr("Cannot stat " ATJOB_DIR);
+    if (stat(".", &buf) == -1) {
+	lerr("Cannot stat " ATJOB_DIR);
+	return next_job;
+    }
 
     if (nothing_to_do && buf.st_mtime == last_chg)
 	return next_job;
     last_chg = buf.st_mtime;
 
     hupped = 0;
-    if ((spool = opendir(".")) == NULL)
-	perr("Cannot read " ATJOB_DIR);
+    if ((spool = opendir(".")) == NULL) {
+	lerr("Cannot read " ATJOB_DIR);
+	return next_job;
+    }
 
     run_batch = 0;
     nothing_to_do = 1;
