diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-04-29 13:59:30 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-04-29 13:59:30 +0300 |
commit | 37f87dce4a7b47cb4b61163b6f66ea6658eaf23b (patch) | |
tree | 0d6dabcdd6bf1f838436fb66add7e9aa564d739b | |
parent | b4b8b6ec832014c02a51cdcf4ce84bd38cc3f05f (diff) | |
download | mailutils-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.c | 12 |
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 '=' */ |