diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-28 15:05:28 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-28 15:05:28 +0100 |
commit | 9f218324e0a2430572fa1b4f9ab169980d001eb0 (patch) | |
tree | 6d83ffd84305992d6c21c7aa841d2281edda3afa /src/libserver | |
parent | ef826765908af52497c499608d43a24637e36009 (diff) | |
download | rspamd-9f218324e0a2430572fa1b4f9ab169980d001eb0.tar.gz rspamd-9f218324e0a2430572fa1b4f9ab169980d001eb0.zip |
[CritFix] Fix SA rawbody processing - exclude top part
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/re_cache.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libserver/re_cache.c b/src/libserver/re_cache.c index db57c0db9..be7394c44 100644 --- a/src/libserver/re_cache.c +++ b/src/libserver/re_cache.c @@ -959,6 +959,15 @@ rspamd_re_cache_exec_re (struct rspamd_task *task, for (i = 0; i < task->parts->len; i++) { mime_part = g_ptr_array_index (task->parts, i); + if (mime_part->parent == NULL) { + /* Top level part */ + scvec[i * 2 + 1] = (guchar *)""; + lenvec[i * 2 + 1] = 0; + scvec[i * 2 + 2] = (guchar *)""; + lenvec[i * 2 + 2] = 0; + continue; + } + if (mime_part->raw_headers_str) { scvec[i * 2 + 1] = (guchar *)mime_part->raw_headers_str; lenvec[i * 2 + 1] = strlen (mime_part->raw_headers_str); |