commit 797a8e3: [Fix] Do not load errored hyperscan database

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Oct 26 20:28:06 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-10-26 20:22:46 +0000
URL: https://github.com/rspamd/rspamd/commit/797a8e37b97dea707937df30406caae25961f58b (HEAD -> master)

[Fix] Do not load errored hyperscan database

---
 src/hs_helper.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/hs_helper.c b/src/hs_helper.c
index 5cef731f2..1f915b01b 100644
--- a/src/hs_helper.c
+++ b/src/hs_helper.c
@@ -214,6 +214,13 @@ rspamd_rs_compile_cb (guint ncompiled, GError *err, void *cbd)
 
 	ctx = (struct hs_helper_ctx *)worker->ctx;
 
+	if (err != NULL) {
+		/* Failed to compile: log and go out */
+		msg_err ("cannot compile Hyperscan database: %e", err);
+
+		return;
+	}
+
 	if (ncompiled > 0) {
 		/* Enforce update for other workers */
 		hack_global_forced = TRUE;


More information about the Commits mailing list