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,6 +100,7 @@ _icvt_decoder (void *xd, ...@@ -100,6 +100,7 @@ _icvt_decoder (void *xd,
100 return mu_filter_ok; 100 return mu_filter_ok;
101 101
102 case mu_filter_done: 102 case mu_filter_done:
103 if (_icvt->cd != (iconv_t) -1)
103 iconv_close (_icvt->cd); 104 iconv_close (_icvt->cd);
104 free (_icvt->fromcode); 105 free (_icvt->fromcode);
105 free (_icvt->tocode); 106 free (_icvt->tocode);
......
...@@ -41,6 +41,8 @@ mh_mailbox_get_cur (mu_mailbox_t mbox, size_t *pcur) ...@@ -41,6 +41,8 @@ mh_mailbox_get_cur (mu_mailbox_t mbox, size_t *pcur)
41 char *p; 41 char *p;
42 *pcur = strtoul (s, &p, 10); 42 *pcur = strtoul (s, &p, 10);
43 if (*p) 43 if (*p)
44 p = mu_str_skip_class (p, MU_CTYPE_SPACE);
45 if (*p)
44 { 46 {
45 mu_error (_("invalid \"cur\" value (%s)"), s); 47 mu_error (_("invalid \"cur\" value (%s)"), s);
46 *pcur = 1; 48 *pcur = 1;
......