[rrd-developers] Bug#573638: rrdtool: rrdcgi crashes at printlasttime()
Tobias Oetiker
tobi at oetiker.ch
Mon Mar 15 09:44:19 CET 2010
Hi Robert,
Yesterday Robert Luberda wrote:
> 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.
right, because the strftime argument is used locally and not passed
on to rrd_last ...
fix is in r2029:2030
thanks
tobi
>
> Thanks a lot,
> Robert
>
>
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900
More information about the rrd-developers
mailing list