]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commit
First bug: in function rrd_fetch_fn_libdbi() variable 'struct sql_table_helper table_...
authorTobias Oetiker <tobi@oetiker.ch>
Sun, 22 Aug 2010 17:56:02 +0000 (17:56 +0000)
committerTobias Oetiker <tobi@oetiker.ch>
Sun, 22 Aug 2010 17:56:02 +0000 (17:56 +0000)
commit445763a97d43ca6957f6048dc2ee74bf94e13fa8
treee8aa129333698e8d1b1097fb2663c87da19f684d
parent3425e441c93ddf1a1354509a5a1c1018cd3f1721
First bug: in function rrd_fetch_fn_libdbi() variable 'struct sql_table_helper table_help'
field 'filename' is uninitialized. So, if a sql error happens, it does not print an error like this
rrd_set_error( "libdbi: problems connecting to db with connect string %s - error: %s",th->filename,dbi_errstr);
instead of, it dumps core.

Second bug: when the output data buffer is allocated, it allocated for 'rows-1' max index, but in
'fetch loop' 'idx' may be equal to 'rows', so it needs one more extra record in data.

-- Pavel Nikiforov pavel artx.ru

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2118 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_fetch_libdbi.c