]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commit
Fix rrdc_fetch behavior on RRDs with multiple DSes 445/head
authorJan Kundrát <jan.kundrat@cesnet.cz>
Wed, 26 Feb 2014 01:57:19 +0000 (02:57 +0100)
committerJan Kundrát <jan.kundrat@cesnet.cz>
Wed, 26 Feb 2014 02:03:13 +0000 (03:03 +0100)
commit0f37a46f30449c457fc1b55254d049b4d7fac837
treefed6d5743402851456fb81ad7e8f209f8fc9ed22
parent649a7b7154c71e542325ea5fb89ae6ef805d12fb
Fix rrdc_fetch behavior on RRDs with multiple DSes

When reading values from RRD files with multiple data sets, the auxiliary
parsing function would only copy the first item from the returned list; the
others were left uninitialized. On my x64_64 Linux machine, this actually reused
values form previous call to parse_char_array_header which happens to be a DS
definition. Given a RRD file with DS "a", "b" and "c", the first value on each
line would be correctly parsed, but the second value is "b", the actual DS name,
and the third one "c". These "values" cannot be parsed as numbers, and the whole
function therefore returns with an error. Making sure that all pointers within
the array are copied therefore fixes this problem.
src/rrd_client.c