Commit 252fcde9 252fcde9b5643eb23703dc16bad6625a47994f1b by Sergey Poznyakoff

Bugfixes.

* libmailutils/filter/iconvflt.c (_icvt_decoder): Do not iconv_close
if cd is -1.
* mh/mboxprop.c (mh_mailbox_get_cur): Ignore whitespace following the cur
value.
1 parent 2a4b7ae3
......@@ -100,7 +100,8 @@ _icvt_decoder (void *xd,
return mu_filter_ok;
case mu_filter_done:
iconv_close (_icvt->cd);
if (_icvt->cd != (iconv_t) -1)
iconv_close (_icvt->cd);
free (_icvt->fromcode);
free (_icvt->tocode);
return mu_filter_ok;
......
......@@ -41,6 +41,8 @@ mh_mailbox_get_cur (mu_mailbox_t mbox, size_t *pcur)
char *p;
*pcur = strtoul (s, &p, 10);
if (*p)
p = mu_str_skip_class (p, MU_CTYPE_SPACE);
if (*p)
{
mu_error (_("invalid \"cur\" value (%s)"), s);
*pcur = 1;
......