diff options
| author | David Bremner <david@tethera.net> | 2020-05-04 10:55:43 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2020-05-04 10:55:43 -0300 |
| commit | 45cfeb2e557bb4eeb2a9821fa44207eeb6cd335c (patch) | |
| tree | 4aaa0ae09288a14ed473660e2ff920b41a68be05 /lib/message.cc | |
| parent | accfee5c6e1f52979adf153126945dd7f49d1b4d (diff) | |
lib: replace STRNCMP_LITERAL in __message_remove_indexed_terms
strncmp looks for a prefix that matches, which is very much not what
we want here. This fixes the bug reported by Franz Fellner in
id:1588595993-ner-8.651@TPL520
Diffstat (limited to 'lib/message.cc')
| -rw-r--r-- | lib/message.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/message.cc b/lib/message.cc index 5c9b58b2..0fa0eb3a 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -751,9 +751,9 @@ _notmuch_message_remove_indexed_terms (notmuch_message_t *message) const char *tag = notmuch_tags_get (tags); - if (STRNCMP_LITERAL (tag, "encrypted") != 0 && - STRNCMP_LITERAL (tag, "signed") != 0 && - STRNCMP_LITERAL (tag, "attachment") != 0) { + if (strcmp (tag, "encrypted") != 0 && + strcmp (tag, "signed") != 0 && + strcmp (tag, "attachment") != 0) { std::string term = tag_prefix + tag; message->doc.add_term (term); } |
