Skip to content

Commit

Permalink
Fix TO parsing when there is a comma inside a quoted display/value
Browse files Browse the repository at this point in the history
This bug was introduced during the re-factoring of the TO parser to support multple body parts - see 908b9f1

Reported by Tito Cumpen <tito@xsvoce.com>

(cherry picked from commit 769fb3c)
  • Loading branch information
bogdan-iancu committed Jan 11, 2018
1 parent d448ab6 commit 8bf502c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions parser/parse_to.c
Expand Up @@ -205,6 +205,8 @@ static inline char* parse_to_param(char *buffer, char *end,
case ',':
switch (status)
{
case PARA_VALUE_QUOTED:
break;
case PARA_NAME:
param->name.len = tmp-param->name.s;
case S_EQUAL:
Expand Down Expand Up @@ -589,6 +591,8 @@ static inline char* _parse_to(char* buffer, char *end, struct to_body *to_b,
case ',':
switch (status)
{
case DISPLAY_QUOTED:
break;
case URI_OR_TOKEN:
case MAYBE_URI_END:
to_b->uri.len = tmp - to_b->uri.s;
Expand Down

0 comments on commit 8bf502c

Please sign in to comment.