summaryrefslogtreecommitdiffstats
path: root/src/libserver/rspamd_control.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-07-24 08:43:42 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-07-24 08:43:42 +0100
commit2f0c6e0f26c6d96442c24e54331c2939ca50127c (patch)
treed13f136708fc0513bb4e7cc224894ccdc635a950 /src/libserver/rspamd_control.c
parente853ac873adbf4730f5c6593a410da310df35cac (diff)
downloadrspamd-2f0c6e0f26c6d96442c24e54331c2939ca50127c.tar.gz
rspamd-2f0c6e0f26c6d96442c24e54331c2939ca50127c.zip
[Minor] Prevent data corruption when dealing with signals
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 279d47d6b..14a258828 100644
--- a/src/libserver/rspamd_control.c
+++ b/src/libserver/rspamd_control.c
@@ -1079,6 +1079,7 @@ rspamd_srv_send_command (struct rspamd_worker *worker,
g_assert (worker != NULL);
rd = g_slice_alloc0 (sizeof (*rd));
+ cmd->id = ottery_rand_uint64 ();
memcpy (&rd->cmd, cmd, sizeof (rd->cmd));
rd->handler = handler;
rd->ud = ud;