summaryrefslogtreecommitdiff
path: root/imap/src/osdep/unix
diff options
context:
space:
mode:
Diffstat (limited to 'imap/src/osdep/unix')
-rw-r--r--imap/src/osdep/unix/dummy.c2
-rw-r--r--imap/src/osdep/unix/tcp_unix.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/imap/src/osdep/unix/dummy.c b/imap/src/osdep/unix/dummy.c
index 244a13cd..646f67ea 100644
--- a/imap/src/osdep/unix/dummy.c
+++ b/imap/src/osdep/unix/dummy.c
@@ -519,7 +519,7 @@ long dummy_delete (MAILSTREAM *stream,char *mailbox)
struct stat sbuf;
char *s,tmp[MAILTMPLEN];
if (!(s = dummy_file (tmp,mailbox))) {
- sprintf (tmp,"Can't delete - invalid name: %.80s",s);
+ sprintf (tmp,"Can't delete - invalid name: %.80s",mailbox);
MM_LOG (tmp,ERROR);
}
/* no trailing / (workaround BSD kernel bug) */
diff --git a/imap/src/osdep/unix/tcp_unix.c b/imap/src/osdep/unix/tcp_unix.c
index 6ddac4df..cf18bb6f 100644
--- a/imap/src/osdep/unix/tcp_unix.c
+++ b/imap/src/osdep/unix/tcp_unix.c
@@ -988,7 +988,7 @@ char *tcp_canonical (char *name)
char *tcp_name (struct sockaddr *sadr,long flag)
{
- char *ret,*t,adr[MAILTMPLEN],tmp[MAILTMPLEN],buf[NI_MAXHOST];
+ char *ret,*t,adr[MAILTMPLEN],tmp[MAILTMPLEN+1],buf[NI_MAXHOST];
sprintf (ret = adr,"[%.80s]",ip_sockaddrtostring (sadr,buf));
if (allowreversedns) {
blocknotify_t bn = (blocknotify_t)mail_parameters(NIL,GET_BLOCKNOTIFY,NIL);
@@ -1002,7 +1002,8 @@ char *tcp_name (struct sockaddr *sadr,long flag)
/* translate address to name */
if ((t = tcp_name_valid (ip_sockaddrtoname (sadr,buf))) != NULL) {
/* produce verbose form if needed */
- if (flag) sprintf (ret = tmp,"%s %s",t,adr);
+ if (flag) sprintf (ret = tmp,"%.*s %.*s", (int) strlen(t), t,
+ MAILTMPLEN - (int)strlen(t) - 1,adr);
else ret = t;
}
(*bn) (BLOCK_NONSENSITIVE,data);