]> source.dussan.org Git - rspamd.git/commitdiff
Check DKIM fields length before decoding.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 4 Dec 2014 21:14:36 +0000 (21:14 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 4 Dec 2014 21:14:36 +0000 (21:14 +0000)
src/libserver/dkim.c

index ecc218434ec3a4f110252d2f83a754c7de561be8..3c6146a376f7d8ceaa8ff87fb51018a5041376e3 100644 (file)
@@ -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;
                                }