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.
Showing
2 changed files
with
4 additions
and
1 deletions
... | @@ -100,7 +100,8 @@ _icvt_decoder (void *xd, | ... | @@ -100,7 +100,8 @@ _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 | iconv_close (_icvt->cd); | 103 | if (_icvt->cd != (iconv_t) -1) |
104 | iconv_close (_icvt->cd); | ||
104 | free (_icvt->fromcode); | 105 | free (_icvt->fromcode); |
105 | free (_icvt->tocode); | 106 | free (_icvt->tocode); |
106 | return mu_filter_ok; | 107 | return mu_filter_ok; | ... | ... |
... | @@ -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; | ... | ... |
-
Please register or sign in to post a comment