diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-10 14:20:14 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-10 14:20:14 +0300 |
commit | db2aa89316d180d8137f4f8f96b5193fd627e894 (patch) | |
tree | 81523aa2f68d9a56deb8677c21806f66ba0b8a41 /src/worker.c | |
parent | 0f3ffee8009da397270ce1ea127dab84285ed432 (diff) | |
download | rspamd-db2aa89316d180d8137f4f8f96b5193fd627e894.tar.gz rspamd-db2aa89316d180d8137f4f8f96b5193fd627e894.zip |
* Fix 2 memory issues:
- NULL string when trying to check url regexp
- double free of message byte array as mime_stream frees memory in array if it thinks that stream is
owner of array's memory
Diffstat (limited to 'src/worker.c')
-rw-r--r-- | src/worker.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/worker.c b/src/worker.c index 53a4db087..6c3b245c5 100644 --- a/src/worker.c +++ b/src/worker.c @@ -146,6 +146,13 @@ read_socket (f_str_t *in, void *arg) task->msg = in; msg_debug ("read_socket: got string of length %ld", (long int)task->msg->len); r = process_message (task); + if (r == -1) { + msg_warn ("read_socket: processing of message failed"); + task->last_error = "MIME processing error"; + task->error_code = RSPAMD_FILTER_ERROR; + task->state = WRITE_ERROR; + write_socket (task); + } r = process_filters (task); if (r == -1) { task->last_error = "Filter processing error"; |