summaryrefslogtreecommitdiff
path: root/imap/src/osdep/unix
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2021-08-19 21:15:42 -0600
committerEduardo Chappa <chappa@washington.edu>2021-08-19 21:15:42 -0600
commit36ca37aa3d669a66a19100f4e2564d6cd1a1b999 (patch)
treed2a419ad3110cee07eb52552f202812cd0231d42 /imap/src/osdep/unix
parente58edb33f71687cb0b12c10a6cea2db2f8a35011 (diff)
downloadalpine-36ca37aa3d669a66a19100f4e2564d6cd1a1b999.tar.xz
* Clear out some warnings given by gcc-10.
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);