]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-fts: More fixes for address tokenizer to handle large input properly
authorMarco Bettini <marco.bettini@open-xchange.com>
Mon, 9 Jan 2023 13:26:23 +0000 (13:26 +0000)
committermarco.bettini <marco.bettini@open-xchange.com>
Tue, 10 Jan 2023 14:33:25 +0000 (14:33 +0000)
src/lib-fts/fts-tokenizer-address.c

index 1a2fb3d24f2cef9f7514eed84d0aca87f07bd04b..b5c03f73ecb5030375180f370aeacb404bdc80ee 100644 (file)
@@ -324,6 +324,10 @@ fts_tokenizer_email_address_next(struct fts_tokenizer *_tok,
                        /* no part of address found yet. remove possible
                           earlier data */
                        str_truncate(tok->last_word, 0);
+                        if (fts_tokenizer_address_parent_data(tok, token_r)) {
+                               *skip_r = pos;
+                               return 1;
+                        }
 
                        /* fall through */
                case EMAIL_ADDRESS_PARSER_STATE_LOCALPART: