serv_fulltext: don't try to index a null message
authorArt Cancro <ajc@citadel.org>
Wed, 27 Sep 2023 03:59:43 +0000 (23:59 -0400)
committerArt Cancro <ajc@citadel.org>
Wed, 27 Sep 2023 03:59:43 +0000 (23:59 -0400)
citadel/server/modules/fulltext/serv_fulltext.c

index 715c168fd892928267716dea650c73126e6f7e99..959e32637e6d14faa4d2b56b9738036dc160650a 100644 (file)
@@ -100,6 +100,10 @@ void ft_index_message(long msgnum, int op) {
                array_len(tokens_in_this_message)
        );
 
+       if (tokens_in_this_message == NULL) {
+               return;
+       }
+
        if (array_len(tokens_in_this_message) > 0) {
                begin_critical_section(S_INDEXER);
                cdb_begin_transaction();