Skip to content

Commit 3c49c44

Browse files
jeriko-oneflatcap
authored andcommitted
Ensure litlen isn't larger than our mailbox
1 parent 36a2928 commit 3c49c44

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: imap/command.c

+7
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,13 @@ static void cmd_parse_status(struct ImapData *idata, char *s)
635635
idata->status = IMAP_FATAL;
636636
return;
637637
}
638+
639+
if (strlen(idata->buf) < litlen)
640+
{
641+
mutt_debug(1, "Error parsing STATUS mailbox\n");
642+
return;
643+
}
644+
638645
mailbox = idata->buf;
639646
s = mailbox + litlen;
640647
*s = '\0';

0 commit comments

Comments
 (0)