mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-29 05:12:41 +00:00
Fix previous commit
This commit is contained in:
parent
d80c372a5c
commit
3fa1ca15e1
@ -483,21 +483,22 @@ struct mail_s *parse_mail_args(char type, const char *arg)
|
|||||||
if (len > MAXFOLDERSIZE-1) {
|
if (len > MAXFOLDERSIZE-1) {
|
||||||
len = MAXFOLDERSIZE-1;
|
len = MAXFOLDERSIZE-1;
|
||||||
}
|
}
|
||||||
|
tmp++;
|
||||||
}
|
}
|
||||||
strncpy(mail->folder, tmp, len);
|
strncpy(mail->folder, tmp, len);
|
||||||
} else {
|
} else {
|
||||||
strncpy(mail->folder, "INBOX", MAXFOLDERSIZE); // default imap inbox
|
strncpy(mail->folder, "INBOX", MAXFOLDERSIZE-1); // default imap inbox
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tmp = (char*)strstr(arg, "-e ");
|
tmp = (char*)strstr(arg, "-e ");
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
int len = MAXFOLDERSIZE-1;
|
int len = 1024;
|
||||||
tmp += 3;
|
tmp += 3;
|
||||||
|
|
||||||
if (tmp[0] == '\'') {
|
if (tmp[0] == '\'') {
|
||||||
len = (char*)strstr(tmp + 1, "'") - tmp - 1;
|
len = (char*)strstr(tmp + 1, "'") - tmp - 1;
|
||||||
if (len > MAXFOLDERSIZE-1) {
|
if (len > 1024) {
|
||||||
len = MAXFOLDERSIZE-1;
|
len = 1024;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
strncpy(mail->command, tmp + 1, len);
|
strncpy(mail->command, tmp + 1, len);
|
||||||
|
Loading…
Reference in New Issue
Block a user