diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-01-06 14:52:43 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-01-06 14:52:43 +0000 |
commit | 8a3312ad64950aab2b494754e32ae974cccf8fa4 (patch) | |
tree | 9656e5def51e4c65cff26c9aa339b92066e02d88 /src/libserver/dkim.c | |
parent | b5aea5adb819d74ab97b764dc08f697ee672c6e2 (diff) | |
download | rspamd-8a3312ad64950aab2b494754e32ae974cccf8fa4.tar.gz rspamd-8a3312ad64950aab2b494754e32ae974cccf8fa4.zip |
[Minor] Fix GError oversetting in DKIM code
Diffstat (limited to 'src/libserver/dkim.c')
-rw-r--r-- | src/libserver/dkim.c | 11 |
1 files changed, 11 insertions, 0 deletions
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++; } |