[rrd-developers] Bug#573638: rrdtool: rrdcgi crashes at printlasttime()

Robert Luberda robert at debian.org
Sun Mar 14 21:53:00 CET 2010


Tobias Oetiker writes:

Hi Tobias,

> in 2012:2013 I put in the patch below ... this should provide a
> more generic fix for the problem. rrd_cgi functions all used to
> fail horribly when a librrd function tried to touch ARGV[0] (mostly


The patch fixes the crash, but you still need to fix the printlasttime()
function by removing `+ 1' in line 991. I mean replacing
  last = rrd_last(argc + 1, (char **) args - 1);
with
  last = rrd_last(argc, (char **) args - 1);

Without the change, iptotal gives the following output:
  Network usage
  Database last updated:    [ERROR: Usage: rrdtool rrdcgi [--daemon ] ]
  Server Time: 	Sun Mar 14 21:36:35 20

After removing the `+ 1' thing, iptotal works as expected and prints
time instead of the usage error message.


Thanks a lot,
Robert



More information about the rrd-developers mailing list