summaryrefslogtreecommitdiffstats
path: root/src/libserver/dkim.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-12-04 21:14:36 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-12-04 21:14:36 +0000
commit77f8bd0abd70a67c4ba5b260716fae8371c0612b (patch)
tree23f475cb8b30d6ba09a6933fc237a90fb152363f /src/libserver/dkim.c
parentac4f36baa1657ebfd0ebe39ff691fa64fd3e5884 (diff)
downloadrspamd-77f8bd0abd70a67c4ba5b260716fae8371c0612b.tar.gz
rspamd-77f8bd0abd70a67c4ba5b260716fae8371c0612b.zip
Check DKIM fields length before decoding.
Diffstat (limited to 'src/libserver/dkim.c')
-rw-r--r--src/libserver/dkim.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libserver/dkim.c b/src/libserver/dkim.c
index ecc218434..3c6146a37 100644
--- a/src/libserver/dkim.c
+++ b/src/libserver/dkim.c
@@ -629,6 +629,7 @@ rspamd_create_dkim_context (const gchar *sig,
case DKIM_STATE_VALUE:
if (*p == ';') {
if (param == DKIM_PARAM_UNKNOWN ||
+ p - c == 0 ||
!parser_funcs[param](new, c, p - c, err)) {
state = DKIM_STATE_ERROR;
}