diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-01-04 11:54:34 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-01-04 11:54:34 +0000 |
commit | bd31dae3ac746694580f66c6b55fc99073925da0 (patch) | |
tree | 178ee47ca265cea06ec77b599fd7cae3c8e56168 /src | |
parent | da7668571fff842b269a43e77f40e86fa1ea58a4 (diff) | |
download | rspamd-bd31dae3ac746694580f66c6b55fc99073925da0.tar.gz rspamd-bd31dae3ac746694580f66c6b55fc99073925da0.zip |
[Fix] Fix rra_ptr conversion
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/rrd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libutil/rrd.c b/src/libutil/rrd.c index eda0a351e..026d0673f 100644 --- a/src/libutil/rrd.c +++ b/src/libutil/rrd.c @@ -1344,7 +1344,6 @@ rspamd_rrd_convert_ds (struct rspamd_rrd_file *old, pdp_prep_old = &old->pdp_prep[idx_old]; pdp_prep_new = &cur->pdp_prep[idx_new]; memcpy (pdp_prep_new, pdp_prep_old, sizeof (*pdp_prep_new)); - memcpy (&cur->rra_ptr[idx_new], &old->rra_ptr[idx_old], sizeof (*old->rra_ptr)); val_old = old->rrd_value; val_new = cur->rrd_value; old_ds = old->stat_head->ds_cnt; @@ -1380,6 +1379,8 @@ rspamd_rrd_convert (const gchar *path, struct rspamd_rrd_file *old, if (rrd) { /* Copy old data */ memcpy (rrd->live_head, old->live_head, sizeof (*rrd->live_head)); + memcpy (rrd->rra_ptr, old->rra_ptr, + sizeof (*old->rra_ptr) * rrd->stat_head->rra_cnt); /* * Old DSes: |