aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/imap.c b/imap.c
index 96a6685d..c3ec1395 100644
--- a/imap.c
+++ b/imap.c
@@ -57,7 +57,10 @@ static int imap_ok(int sock, char *argbuf)
/* interpret untagged status responses */
if (strstr(buf, "* CAPABILITY"))
+ {
strncpy(capabilities, buf + 12, sizeof(capabilities));
+ capabilities[sizeof(capabilities)-1] = '\0';
+ }
else if (strstr(buf, "EXISTS"))
{
count = atoi(buf+2);