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

Robert Luberda <[email protected]>
Newsgroups gmane.linux.debian.devel.bugs.general,gmane.comp.db.rrdtool.devel
Organization Debian
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.