From 8bf502c7f3a649fcc06f97be76f9291b9d512ad2 Mon Sep 17 00:00:00 2001 From: Bogdan-Andrei Iancu Date: Thu, 11 Jan 2018 13:06:19 +0200 Subject: [PATCH] Fix TO parsing when there is a comma inside a quoted display/value This bug was introduced during the re-factoring of the TO parser to support multple body parts - see 908b9f190bff3b356f76ce8ca75d43a2c149a412 Reported by Tito Cumpen (cherry picked from commit 769fb3c5913c9d7e583c4cdbdf26aae82cdaa205) --- parser/parse_to.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/parser/parse_to.c b/parser/parse_to.c index a46c36f5fc..c2b8e2a62d 100644 --- a/parser/parse_to.c +++ b/parser/parse_to.c @@ -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: @@ -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;