diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-06-08 10:57:18 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-06-08 10:57:18 +0100 |
commit | 9053f81dc2347afdb317c92200744583d84a3fa3 (patch) | |
tree | 58e8b264ee28cb2afe3097b742839288ba63193d | |
parent | b12f0bd37e4b65613e2de53ca5131597d57f7603 (diff) | |
download | rspamd-9053f81dc2347afdb317c92200744583d84a3fa3.tar.gz rspamd-9053f81dc2347afdb317c92200744583d84a3fa3.zip |
[Minor] Fix allocation size for milter commands
-rw-r--r-- | src/libserver/milter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libserver/milter.c b/src/libserver/milter.c index c9a537ab7..94dcbfc8c 100644 --- a/src/libserver/milter.c +++ b/src/libserver/milter.c @@ -1019,8 +1019,8 @@ rspamd_milter_set_reply (struct rspamd_milter_session *session, #define SET_COMMAND(cmd, sz, reply, pos) do { \ guint32 _len; \ _len = (sz) + 1; \ - (reply) = rspamd_fstring_sized_new (sizeof (_len) + (sz)); \ - (reply)->len = sizeof (_len) + (sz) + 1; \ + (reply) = rspamd_fstring_sized_new (sizeof (_len) + _len); \ + (reply)->len = sizeof (_len) + _len; \ _len = htonl (_len); \ memcpy ((reply)->str, &_len, sizeof (_len)); \ (reply)->str[sizeof(_len)] = (cmd); \ |