]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix smtp comments exclusion
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 18 Nov 2020 12:29:22 +0000 (12:29 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 18 Nov 2020 12:29:22 +0000 (12:29 +0000)
src/libmime/email_addr.c

index 34b2ff81ac21dcfd7169c423e132cbc99728797b..4b8c6bc1c5fb6d1b903d10264302ddd03bf25c49 100644 (file)
@@ -294,10 +294,11 @@ rspamd_email_address_from_mime (rspamd_mempool_t *pool, const gchar *hdr,
                                        state = parse_quoted;
                                }
                                else if (*p == '(') {
-                                       obraces ++;
+                                       obraces ++; /* To avoid ) itself being copied */
                                }
                                else if (*p == ')') {
                                        ebraces ++;
+                                       p ++;
                                }
 
                                if (obraces == ebraces) {