Commit e57a8602 authored by Kevin J. McCarthy's avatar Kevin J. McCarthy

Verify IMAP status mailbox literal count size.

Ensure the length isn't bigger than the idata->buf.

Thanks to Jeriko One fo the bug report and patch, which this commit is
based upon.
parent 9347b5c0
......@@ -969,6 +969,13 @@ static void cmd_parse_status (IMAP_DATA* idata, char* s)
idata->status = IMAP_FATAL;
return;
}
if (strlen(idata->buf) < litlen)
{
dprint (1, (debugfile, "Error parsing STATUS mailbox\n"));
return;
}
mailbox = idata->buf;
s = mailbox + litlen;
*s = '\0';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment