aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1999-09-16 06:39:56 +0000
committerEric S. Raymond <esr@thyrsus.com>1999-09-16 06:39:56 +0000
commite1b85c91f52dc5c29c38a097a54622b2b0bc0ef6 (patch)
treef3642cd38acb970831d5d88d783dd7563527fb76 /imap.c
parent2577a80a8110ec4366efdd399d80777e325c0c84 (diff)
downloadfetchmail-e1b85c91f52dc5c29c38a097a54622b2b0bc0ef6.tar.gz
fetchmail-e1b85c91f52dc5c29c38a097a54622b2b0bc0ef6.tar.bz2
fetchmail-e1b85c91f52dc5c29c38a097a54622b2b0bc0ef6.zip
Minor fixes.
svn path=/trunk/; revision=2563
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/imap.c b/imap.c
index 12f288f0..5d62a135 100644
--- a/imap.c
+++ b/imap.c
@@ -749,6 +749,7 @@ static int do_cram_md5 (int sock, struct query *ctl)
{
int result;
int len;
+ int quot;
unsigned char buf1[1024];
unsigned char msg_id[768];
unsigned char response[16];
@@ -792,13 +793,14 @@ static int do_cram_md5 (int sock, struct query *ctl)
msg_id, strlen (msg_id),
response, sizeof (response));
+ quot = (int) strpbrk (ctl->remotename, " ");
#ifdef HAVE_SNPRINTF
snprintf (reply, sizeof (reply),
#else
sprintf(reply,
#endif
- "\"%s\" %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
- ctl->remotename,
+ "%s%s%s %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
+ quot ? "\"" : "", ctl->remotename, quot ? "\"" : "",
response[0], response[1], response[2], response[3],
response[4], response[5], response[6], response[7],
response[8], response[9], response[10], response[11],