summaryrefslogtreecommitdiff
path: root/mail/sympa/patches/patch-ad
blob: c6bf148eadcf3e031d7b40dd7b0368eaa5fd050b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$NetBSD: patch-ad,v 1.3 2005/02/15 22:45:54 seb Exp $

--- src/bouncequeue.c.orig	2003-10-07 12:04:47.000000000 +0000
+++ src/bouncequeue.c
@@ -30,6 +30,11 @@ static char     qfile[128];
 static char     buf[16384];
 static int      i, fd;
 
+/* For HP-UX */
+#ifndef EX_CONFIG
+# define EX_CONFIG 78
+#endif
+
 #ifndef CONFIG
 # define CONFIG		"/etc/sympa.conf"
 #endif
@@ -97,7 +102,7 @@ main(int argn, char **argv)
       exit(EX_NOPERM);
    }
    umask(027);
-   sprintf(qfile, "T.%s.%ld.%d", listname, time(NULL), getpid());
+   snprintf(qfile, sizeof(qfile), "T.%s.%ld.%d", listname, time(NULL), getpid());
    fd = open(qfile, O_CREAT|O_WRONLY, 0600);
    if (fd == -1)
       exit(EX_TEMPFAIL);