aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2003-03-01 02:34:14 +0000
committerEric S. Raymond <esr@thyrsus.com>2003-03-01 02:34:14 +0000
commit7524420b35ea75e3617b4a1f003b278742e7acd2 (patch)
treef34d9d8d211b9c13706e115fe58b2750b2457f98 /imap.c
parent80f45bfec11103cc60131759d9abd84114cf4657 (diff)
downloadfetchmail-7524420b35ea75e3617b4a1f003b278742e7acd2.tar.gz
fetchmail-7524420b35ea75e3617b4a1f003b278742e7acd2.tar.bz2
fetchmail-7524420b35ea75e3617b4a1f003b278742e7acd2.zip
Guard some buffers.
svn path=/trunk/; revision=3804
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);