From 8167f58e118afa658590253f8696c816511c3708 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sat, 31 Jul 2021 21:16:15 -0600 Subject: * Clear more warnings given by gcc-10. Work in progress. --- imap/src/osdep/unix/dummy.c | 2 +- imap/src/osdep/unix/mmdf.c | 2 +- imap/src/osdep/unix/tcp_unix.c | 2 +- imap/src/osdep/unix/unix.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'imap') diff --git a/imap/src/osdep/unix/dummy.c b/imap/src/osdep/unix/dummy.c index 4c57c094..244a13cd 100644 --- a/imap/src/osdep/unix/dummy.c +++ b/imap/src/osdep/unix/dummy.c @@ -274,7 +274,7 @@ void dummy_list_work (MAILSTREAM *stream,char *dir,char *pat,char *contents, DIR *dp; struct direct *d; struct stat sbuf; - char tmp[MAILTMPLEN],path[MAILTMPLEN]; + char tmp[MAILTMPLEN],path[MAILTMPLEN + 1]; size_t len = 0; /* punt if bogus name */ if (!mailboxdir (tmp,dir,NIL)) return; diff --git a/imap/src/osdep/unix/mmdf.c b/imap/src/osdep/unix/mmdf.c index 4a9e9934..5cfa197e 100644 --- a/imap/src/osdep/unix/mmdf.c +++ b/imap/src/osdep/unix/mmdf.c @@ -1912,7 +1912,7 @@ int mmdf_parse (MAILSTREAM *stream,DOTLOCK *lock,int op) !compare_cstring (tmp,"X-IMAP") || !compare_cstring (tmp,"X-IMAPBASE")) { char err[MAILTMPLEN]; - sprintf (err,"Discarding bogus %s header in message %lu", + sprintf (err,"Discarding bogus %.20s header in message %lu", (char *) tmp,elt->msgno); MM_LOG (err,WARN); retain = NIL; /* don't retain continuation */ diff --git a/imap/src/osdep/unix/tcp_unix.c b/imap/src/osdep/unix/tcp_unix.c index aaa24675..6ddac4df 100644 --- a/imap/src/osdep/unix/tcp_unix.c +++ b/imap/src/osdep/unix/tcp_unix.c @@ -994,7 +994,7 @@ char *tcp_name (struct sockaddr *sadr,long flag) blocknotify_t bn = (blocknotify_t)mail_parameters(NIL,GET_BLOCKNOTIFY,NIL); void *data; if (tcpdebug) { - sprintf (tmp,"Reverse DNS resolution %s",adr); + sprintf (tmp,"Reverse DNS resolution %.82s",adr); mm_log (tmp,TCPDEBUG); } (*bn) (BLOCK_DNSLOOKUP,NIL);/* quell alarms */ diff --git a/imap/src/osdep/unix/unix.c b/imap/src/osdep/unix/unix.c index 97626576..8fec0ee6 100644 --- a/imap/src/osdep/unix/unix.c +++ b/imap/src/osdep/unix/unix.c @@ -1735,7 +1735,7 @@ int unix_parse (MAILSTREAM *stream,DOTLOCK *lock,int op) !compare_cstring (tmp,"X-IMAP") || !compare_cstring (tmp,"X-IMAPBASE")) { char err[MAILTMPLEN]; - sprintf (err,"Discarding bogus %s header in message %lu", + sprintf (err,"Discarding bogus %.20s header in message %lu", (char *) tmp,elt->msgno); MM_LOG (err,WARN); retain = NIL; /* don't retain continuation */ -- cgit v1.2.3-70-g09d2