commit 8a3312a: [Minor] Fix GError oversetting in DKIM code
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Jan 6 14:56:12 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-01-06 14:52:43 +0000
URL: https://github.com/rspamd/rspamd/commit/8a3312ad64950aab2b494754e32ae974cccf8fa4 (HEAD -> master)
[Minor] Fix GError oversetting in DKIM code
---
src/libserver/dkim.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/libserver/dkim.c b/src/libserver/dkim.c
index 4b66ebbd5..b3efd2149 100644
--- a/src/libserver/dkim.c
+++ b/src/libserver/dkim.c
@@ -1032,6 +1032,17 @@ rspamd_create_dkim_context (const gchar *sig,
if (!parser_funcs[param](ctx, c, tlen, err)) {
state = DKIM_STATE_ERROR;
}
+ if (state == DKIM_STATE_ERROR) {
+ /*
+ * We need to return from here as state machine won't
+ * do any more steps after p == end
+ */
+ if (err) {
+ msg_info_dkim ("dkim parse failed: %e", *err);
+ }
+
+ return NULL;
+ }
/* Finish processing */
p++;
}
More information about the Commits
mailing list