]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-fts: fts-tokenizer-address - Cleanup NUL handling in parent_data
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sat, 21 Apr 2018 13:07:21 +0000 (16:07 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 30 Aug 2018 08:15:38 +0000 (11:15 +0300)
The end result is anyway that the token will be truncated at the first NUL.
This change just makes the code a bit more understandable on where the
truncation will happen.

src/lib-fts/fts-tokenizer-address.c

index 59b73244d4aae586eaeee79a3f644b75bfe9f1d4..9568e0f692b4fcab8bbee84821f6472ba73da88f 100644 (file)
@@ -216,7 +216,7 @@ fts_tokenizer_address_update_parent(struct email_address_fts_tokenizer *tok,
                                     const unsigned char *data, size_t size)
 {
        if (tok->tokenizer.parent != NULL)
-               str_append_n(tok->parent_data, data, size);
+               str_append_data(tok->parent_data, data, size);
 }
 
 static void fts_tokenizer_email_address_reset(struct fts_tokenizer *_tok)