]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix crash if skip_map is used
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 17 May 2018 15:04:17 +0000 (16:04 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 17 May 2018 15:04:17 +0000 (16:04 +0100)
src/fuzzy_storage.c

index c45a998ca0495d2a249f5489c2247087e0c523ec..44b7c555e174a7a5373ed460bc5a9b5b549dcecc 100644 (file)
@@ -167,7 +167,7 @@ struct rspamd_fuzzy_storage_ctx {
        struct rspamd_worker *worker;
        struct rspamd_http_connection_router *collection_rt;
        const ucl_object_t *skip_map;
-       GHashTable *skip_hashes;
+       struct rspamd_hash_map_helper *skip_hashes;
        guchar cookie[COOKIE_SIZE];
 };
 
@@ -911,7 +911,7 @@ rspamd_fuzzy_process_command (struct fuzzy_session *session)
                                        hexbuf, sizeof (hexbuf) - 1);
                                hexbuf[sizeof (hexbuf) - 1] = '\0';
 
-                               if (g_hash_table_lookup (session->ctx->skip_hashes, hexbuf)) {
+                               if (rspamd_match_hash_map (session->ctx->skip_hashes, hexbuf)) {
                                        result.v1.value = 401;
                                        result.v1.prob = 0.0;