Skip to content
Permalink
Browse files Browse the repository at this point in the history
Ensure litlen isn't larger than our mailbox
  • Loading branch information
jeriko-one authored and flatcap committed Jul 7, 2018
1 parent 36a2928 commit 3c49c44
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions imap/command.c
Expand Up @@ -635,6 +635,13 @@ static void cmd_parse_status(struct ImapData *idata, char *s)
idata->status = IMAP_FATAL;
return;
}

if (strlen(idata->buf) < litlen)
{
mutt_debug(1, "Error parsing STATUS mailbox\n");
return;
}

mailbox = idata->buf;
s = mailbox + litlen;
*s = '\0';
Expand Down

0 comments on commit 3c49c44

Please sign in to comment.