summaryrefslogtreecommitdiff
path: root/imap/src
diff options
context:
space:
mode:
Diffstat (limited to 'imap/src')
-rw-r--r--imap/src/osdep/nt/tcp_nt.c2
-rw-r--r--imap/src/osdep/unix/tcp_unix.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/imap/src/osdep/nt/tcp_nt.c b/imap/src/osdep/nt/tcp_nt.c
index 3a836b12..2c17d6b7 100644
--- a/imap/src/osdep/nt/tcp_nt.c
+++ b/imap/src/osdep/nt/tcp_nt.c
@@ -856,7 +856,7 @@ char *tcp_canonical (char *name)
char *ret,host[MAILTMPLEN];
blocknotify_t bn = (blocknotify_t) mail_parameters (NIL,GET_BLOCKNOTIFY,NIL);
/* look like domain literal? */
- if (name[0] == '[' && name[strlen (name) - 1] == ']') return name;
+ if (name[0] == '[' && name[strlen (name) - 1] == ']') return cpystr(name);
(*bn) (BLOCK_DNSLOOKUP,NIL);
if (tcpdebug) {
sprintf (host,"DNS canonicalization %.80s",name);
diff --git a/imap/src/osdep/unix/tcp_unix.c b/imap/src/osdep/unix/tcp_unix.c
index bc5fe33a..aaa24675 100644
--- a/imap/src/osdep/unix/tcp_unix.c
+++ b/imap/src/osdep/unix/tcp_unix.c
@@ -965,7 +965,7 @@ char *tcp_canonical (char *name)
blocknotify_t bn = (blocknotify_t) mail_parameters (NIL,GET_BLOCKNOTIFY,NIL);
void *data;
/* look like domain literal? */
- if (name[0] == '[' && name[strlen (name) - 1] == ']') return name;
+ if (name[0] == '[' && name[strlen (name) - 1] == ']') return cpystr(name);
(*bn) (BLOCK_DNSLOOKUP,NIL); /* quell alarms */
data = (*bn) (BLOCK_SENSITIVE,NIL);
if (tcpdebug) {