Commit bc4fde46 bc4fde46c23c4d93268989306bb6b9689e0fe506 by Sergey Poznyakoff

Bugfixes

* imap4d/util.c (imap4d_getline): Do not report
ERR_NO_IFILE if an empty line is read.
* mailbox/msrv.c (server_section_parser): Catch
null tags.

Bugs reported by Simon Josefsson.
1 parent 3f69e162
......@@ -1375,19 +1375,17 @@ imap4d_getline (char **pbuf, size_t *psize, size_t *pnbytes)
if (rc == 0)
{
char *s = *pbuf;
len = util_trim_nl (s, len);
if (imap4d_transcript)
{
if (len)
mu_diag_output (MU_DIAG_DEBUG, "recv: %s", s);
else
mu_diag_output (MU_DIAG_DEBUG, "got EOF");
}
if (len == 0)
{
if (imap4d_transcript)
mu_diag_output (MU_DIAG_DEBUG, "got EOF");
imap4d_bye (ERR_NO_IFILE);
/*FIXME rc = ECONNABORTED;*/
}
len = util_trim_nl (s, len);
if (imap4d_transcript)
mu_diag_output (MU_DIAG_DEBUG, "recv: %s", s);
if (pnbytes)
*pnbytes = len;
}
......
......@@ -970,7 +970,7 @@ server_section_parser (enum mu_cfg_section_stage stage,
{
case mu_cfg_section_start:
{
if (node->label->type != MU_CFG_STRING)
if (node->label == NULL || node->label->type != MU_CFG_STRING)
return 1;
/* FIXME: should not modify 2nd arg, or it should not be const */
return server_block_begin (tree->debug, node->label->v.string,
......