From 3fa1ca15e1ccf99fe8c23c531097d279d0bfddc5 Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Wed, 2 Jun 2010 19:28:40 +0200 Subject: [PATCH] Fix previous commit --- src/mail.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mail.cc b/src/mail.cc index 204ae308..f50cf5e6 100644 --- a/src/mail.cc +++ b/src/mail.cc @@ -483,21 +483,22 @@ struct mail_s *parse_mail_args(char type, const char *arg) if (len > MAXFOLDERSIZE-1) { len = MAXFOLDERSIZE-1; } + tmp++; } strncpy(mail->folder, tmp, len); } else { - strncpy(mail->folder, "INBOX", MAXFOLDERSIZE); // default imap inbox + strncpy(mail->folder, "INBOX", MAXFOLDERSIZE-1); // default imap inbox } } tmp = (char*)strstr(arg, "-e "); if (tmp) { - int len = MAXFOLDERSIZE-1; + int len = 1024; tmp += 3; if (tmp[0] == '\'') { len = (char*)strstr(tmp + 1, "'") - tmp - 1; - if (len > MAXFOLDERSIZE-1) { - len = MAXFOLDERSIZE-1; + if (len > 1024) { + len = 1024; } } strncpy(mail->command, tmp + 1, len);