Skip to content
Permalink
Browse files

Ensure litlen isn't larger than our mailbox

  • Loading branch information...
jeriko-one authored and flatcap committed Jul 7, 2018
1 parent 36a2928 commit 3c49c44be9b459d9c616bcaef6eb5d51298c1741
Showing with 7 additions and 0 deletions.
  1. +7 −0 imap/command.c
@@ -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';

0 comments on commit 3c49c44

Please sign in to comment.
You can’t perform that action at this time.