Code

Fix out-of-bound index in rrdtool.c
authorWill Hawkins <hawkinsw@opentechinstitute.org>
Fri, 22 Jun 2012 18:45:45 +0000 (14:45 -0400)
committerFlorian Forster <octo@collectd.org>
Wed, 27 Jun 2012 16:04:43 +0000 (18:04 +0200)
Fix a reference to argv[1] that is (always?)
outside the bounds of the argv array. It happens
during a log statement that seems to want
to actually refer to the rrd filename.

src/rrdtool.c

index 4655b96ee77c79a74dca16f9f412bd2df55d3cd7..2b384d09d7690b113aeadd5b4fec588f72b9b4ba 100644 (file)
@@ -185,7 +185,7 @@ static int srrd_update (char *filename, char *template,
        if (status != 0)
        {
                WARNING ("rrdtool plugin: rrd_update_r failed: %s: %s",
-                               argv[1], rrd_get_error ());
+                               filename, rrd_get_error ());
        }
 
        sfree (new_argv);