author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 22 Aug 2010 17:56:02 +0000 (17:56 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 22 Aug 2010 17:56:02 +0000 (17:56 +0000) | ||
commit | 7b12d9d30e2ec15476996693b340abe2f9122af5 | |
tree | 89521e747dc642dc29eff7e8fd867f8a0667a6ed | tree | snapshot |
parent | 506c77a912e3ad415adb30d712feaffb4546e4d1 | commit | diff |
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/branches/1.4@2118 a5681a0c-68f1-0310-ab6d-d61299d08faa
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/branches/1.4@2118 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/src/rrd_fetch_libdbi.c | diff | blob | history |