summaryrefslogtreecommitdiffstats
path: root/src/libserver/rspamd_control.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-18 23:36:42 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-18 23:36:42 +0000
commit20457a019f6940fbb6e6a5e89ab23f42b126ad3b (patch)
treef35c0e725a830b6242ef4b9f2624ad65875d5aa9 /src/libserver/rspamd_control.c
parent6950e3a46bace0e026d0a0df67f931ca459ac0a7 (diff)
downloadrspamd-20457a019f6940fbb6e6a5e89ab23f42b126ad3b.tar.gz
rspamd-20457a019f6940fbb6e6a5e89ab23f42b126ad3b.zip
[Fix] Fix memory corruprtion and leak
Diffstat (limited to 'src/libserver/rspamd_control.c')
-rw-r--r--src/libserver/rspamd_control.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libserver/rspamd_control.c b/src/libserver/rspamd_control.c
index 592e3dbc1..c78f501f7 100644
--- a/src/libserver/rspamd_control.c
+++ b/src/libserver/rspamd_control.c
@@ -774,6 +774,7 @@ rspamd_srv_handler (gint fd, short what, gpointer ud)
rdata->rep.id = cmd.id;
rdata->rep.type = cmd.type;
rdata->fd = -1;
+
if (msg.msg_controllen >= CMSG_LEN (sizeof (int))) {
rfd = *(int *) CMSG_DATA(CMSG_FIRSTHDR (&msg));
}