projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd5f6ba
)
rrd plugin: Fix writing of long values.
author
Miroslav Lichvar
<mlichvar@redhat.com>
Mon, 20 Nov 2017 11:02:44 +0000
(12:02 +0100)
committer
Florian Forster
<octo@collectd.org>
Tue, 21 Nov 2017 09:31:34 +0000
(10:31 +0100)
The buffer provided for value_list_to_string() was not long enough to
fit a timestamp and a negative value using exponent and maximum
precision of the gauge format.
Signed-off-by: Florian Forster <octo@collectd.org>
src/rrdtool.c
patch
|
blob
|
history
diff --git
a/src/rrdtool.c
b/src/rrdtool.c
index
5f42561
..
558b800
100644
(file)
--- a/
src/rrdtool.c
+++ b/
src/rrdtool.c
@@
-803,7
+803,7
@@
static int rrd_write(const data_set_t *ds, const value_list_t *vl,
if (value_list_to_filename(filename, sizeof(filename), vl) != 0)
return -1;
- char values[32 *
ds->ds_num
];
+ char values[32 *
(ds->ds_num + 1)
];
if (value_list_to_string(values, sizeof(values), ds, vl) != 0)
return -1;