aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-05-26 18:54:44 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-05-26 18:54:44 +0400
commit2a5690e7c12ac78c8ba8bd9f6e7d0a60c577201b (patch)
treeafaef5e7bd71e05102901dd5e6ef267a4bdead29 /src/buffer.c
parentd608ddf90823ba1fb60bed510751fb219f440f0e (diff)
downloadrspamd-2a5690e7c12ac78c8ba8bd9f6e7d0a60c577201b.tar.gz
rspamd-2a5690e7c12ac78c8ba8bd9f6e7d0a60c577201b.zip
* Continue implementing smtp proxy
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 1749cb624..ec435bc83 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -384,6 +384,11 @@ rspamd_dispatcher_write (rspamd_io_dispatcher_t * d, void *data, size_t len, gbo
rspamd_buffer_t *newbuf;
newbuf = memory_pool_alloc (d->pool, sizeof (rspamd_buffer_t));
+ if (len == 0) {
+ /* Assume NULL terminated */
+ len = strlen ((char *)data);
+ }
+
if (!allocated) {
newbuf->data = fstralloc (d->pool, len);