commit 023aa4a: [Minor] Oops, fix encrypted reply

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Jun 24 15:21:09 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-06-24 15:54:38 +0100
URL: https://github.com/rspamd/rspamd/commit/023aa4a7c0136637efce423647a11a25683fa6e5

[Minor] Oops, fix encrypted reply

---
 src/fuzzy_storage.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c
index 6242e47c7..0d7721ffb 100644
--- a/src/fuzzy_storage.c
+++ b/src/fuzzy_storage.c
@@ -759,12 +759,17 @@ rspamd_fuzzy_check_callback (struct rspamd_fuzzy_reply *result, void *ud)
 	struct rspamd_shingle sgl_cpy;
 
 	switch (session->cmd_type) {
-	case CMD_NORMAL:
 	case CMD_ENCRYPTED_NORMAL:
+		encrypted = TRUE;
+		/* Fallthrough */
+	case CMD_NORMAL:
 		cmd = &session->cmd.basic;
 		break;
-	case CMD_SHINGLE:
+
 	case CMD_ENCRYPTED_SHINGLE:
+		encrypted = TRUE;
+		/* Fallthrough */
+	case CMD_SHINGLE:
 		cmd = &session->cmd.basic;
 		memcpy (&sgl_cpy, &session->cmd.sgl, sizeof (sgl_cpy));
 		shingle = &sgl_cpy;


More information about the Commits mailing list