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>
if (value_list_to_filename(filename, sizeof(filename), vl) != 0)
return -1;
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;
if (value_list_to_string(values, sizeof(values), ds, vl) != 0)
return -1;