diff options
Diffstat (limited to 'common')
| -rw-r--r-- | common/smtppass.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/smtppass.c b/common/smtppass.c index 92b7daa..bbd1e8c 100644 --- a/common/smtppass.c +++ b/common/smtppass.c @@ -247,7 +247,7 @@ void sp_init(const char* name) int sp_run(const char* configfile, const char* pidfile, int dbg_level) { int sock; - int true = 1; + int tru = 1; ASSERT(configfile); ASSERT(g_state.name); @@ -317,7 +317,7 @@ int sp_run(const char* configfile, const char* pidfile, int dbg_level) } fcntl(sock, F_SETFD, fcntl(sock, F_GETFD, 0) | FD_CLOEXEC); - setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *)&true, sizeof(true)); + setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *)&tru, sizeof(tru)); /* Unlink the socket file if it exists */ if(SANY_TYPE(g_state.listenaddr) == AF_UNIX) @@ -1811,7 +1811,7 @@ const char kMsgDelimiter[] = ": "; static void vmessage(spctx_t* ctx, int level, int err, const char* msg, va_list ap) { - char buf[MAX_MSGLEN]; + char buf[MAX_MSGLEN] = { 0, }; int e = errno; if(g_state.daemonized) @@ -1839,7 +1839,7 @@ static void vmessage(spctx_t* ctx, int level, int err, strerror_r(e, buf + len, MAX_MSGLEN - len); */ sp_lock(); - strncat(buf, strerror(e), MAX_MSGLEN); + strncat(buf, strerror(e), MAX_MSGLEN - 1); sp_unlock(); } |
