aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/email_addr.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-11-18 10:50:30 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-11-18 10:50:30 +0000
commit0c18f2f9fbcf581bf398bc3c30d1a78648b50911 (patch)
tree6c70deaedbbb808faafb97cf3c8986c48865edae /src/libmime/email_addr.c
parent20667e8faab9aab17275e7da27e8e9e0d6572bd4 (diff)
downloadrspamd-0c18f2f9fbcf581bf398bc3c30d1a78648b50911.tar.gz
rspamd-0c18f2f9fbcf581bf398bc3c30d1a78648b50911.zip
[Fix] Fix parsing of escape characters in quoted pairs
Diffstat (limited to 'src/libmime/email_addr.c')
-rw-r--r--src/libmime/email_addr.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libmime/email_addr.c b/src/libmime/email_addr.c
index f3aa36218..34b2ff81a 100644
--- a/src/libmime/email_addr.c
+++ b/src/libmime/email_addr.c
@@ -407,7 +407,15 @@ rspamd_email_address_from_mime (rspamd_mempool_t *pool, const gchar *hdr,
p ++;
break;
case parse_quoted:
- if (*p == '"') {
+ if (*p == '\\') {
+ if (p > c) {
+ g_string_append_len (ns, c, p - c);
+ }
+
+ p ++;
+ c = p;
+ }
+ else if (*p == '"') {
if (p > c) {
g_string_append_len (ns, c, p - c);
}