summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-04-29 13:59:30 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2010-04-29 13:59:30 +0300
commit37f87dce4a7b47cb4b61163b6f66ea6658eaf23b (patch)
tree0d6dabcdd6bf1f838436fb66add7e9aa564d739b
parentb4b8b6ec832014c02a51cdcf4ce84bd38cc3f05f (diff)
downloadmailutils-37f87dce4a7b47cb4b61163b6f66ea6658eaf23b.tar.gz
mailutils-37f87dce4a7b47cb4b61163b6f66ea6658eaf23b.tar.bz2
Allow for a sequence of semicolons before kw/value pair in a structured header.
* mailbox/mimehdr.c (_header_get_param): Skip superfluous semicolons.
-rw-r--r--mailbox/mimehdr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/mailbox/mimehdr.c b/mailbox/mimehdr.c
index df6624cbb..731e48575 100644
--- a/mailbox/mimehdr.c
+++ b/mailbox/mimehdr.c
@@ -144,6 +144,18 @@ _header_get_param (const char *field_body,
/* walk upto start of param */
p = mu_str_skip_class (p + 1, MU_CTYPE_SPACE);
+
+ /* Reportedly, some MUAs insert several semicolons */
+ if (*p == ';')
+ continue;
+
+ /* Ignore stray characters */
+ if (_ISSPECIAL (*p))
+ {
+ p = strchr (p, ';');
+ continue;
+ }
+
if ((ep = strchr (p, '=')) == NULL)
break;
/* Allow for optional whitespace after '=' */

Return to:

Send suggestions and report system problems to the System administrator.