at/at-3.2.5-address-issues-from-static-analyzer.patch

34 lines
844 B
Diff
Raw Normal View History

diff -ur a/atd.c b/atd.c
--- a/atd.c 2024-11-06 12:48:35.368394905 +0100
+++ b/atd.c 2024-11-06 12:50:09.301052284 +0100
@@ -295,7 +295,7 @@
int fd_out, fd_in, fd_std;
char jobbuf[9];
char *mailname = NULL;
- int mailsize = 128;
+ size_t mailsize = 128;
char *newname;
FILE *stream;
int send_mail = 0;
@@ -308,7 +308,7 @@
char queue;
char fmt[64];
unsigned long jobno;
- int rc;
+ long rc;
char hostbuf[MAXHOSTNAMELEN];
#ifdef WITH_PAM
int retcode;
diff -ur a/posixtm.c b/posixtm.c
--- a/posixtm.c 2022-02-05 11:00:57.000000000 +0100
+++ b/posixtm.c 2024-11-06 12:50:28.143186147 +0100
@@ -188,7 +188,7 @@
bool
posixtime (time_t *p, const char *s, unsigned int syntax_bits)
{
- struct tm tm0;
+ struct tm tm0 = {0};
struct tm tm1;
struct tm const *tm;
time_t t;