[rrd-developers] Re: Uninitialized pointer prevents dump/tune of RRD with CDEF

Chris Adams cmadams at hiwaay.net
Fri Oct 27 01:52:28 MEST 2006


Once upon a time, Tobias Oetiker <tobi at oetiker.ch> said:
> if you look at rrd_rpncalc.c you can see that count gets
> initialized to zero on the first line ... or am I pointerconfused ?

The pointer that isn't getting initialized is passed to addop2str() in
**result_str, which is called from rpn_compact2str().  In rrd_info.c,
this arg is declared with "char *buffer = 0;", but rrd_dump.c and
rrd_tune.c don't initialize this pointer.

addop2str() takes the passed pointer and sends it to realloc(), which
when given an non-zero pointer that didn't come from malloc(), calloc(),
or realloc() aborts.

-- 
Chris Adams <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-developers
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-developers mailing list