]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commit
rrdtool is assuming that rrd_xport will always return -1 on failure;
authorTobias Oetiker <tobi@oetiker.ch>
Mon, 16 Jan 2012 10:59:14 +0000 (10:59 +0000)
committerTobias Oetiker <tobi@oetiker.ch>
Mon, 16 Jan 2012 10:59:14 +0000 (10:59 +0000)
commit8f6b4abd062cd9e85a010081bed6ce18de22d519
tree4c3bf8bff71266bef39ae7ff2245524b69b96f01
parentf440077191a8ea6d1c2e63f47d685a84a841867f
rrdtool is assuming that rrd_xport will always return -1 on failure;
however, rrd_xport returns errno (which is, generally, not -1) if
rrd_client fails. I figured it was easier to change rrdtool than to change
everything in rrd_client. For good measure, I also changed the checks on
the calls to rrd_fetch and rrd_graph. I'm not sure if they're susceptible
to the same problem, but, well, better to check for the one thing you do
what you want than to enumerate all the possible things you don't want.

This segfault is caused by an uninitialized variable use (in particular,
legend_v and col_cnt end up being used and passed to printf uninitialized).
Nothing offhand jumped out at me as easily-exploitable to do code
injection, but I only spent five or so minutes looking at it, so there very
well may be a security problem hiding behind this. -- James Brown <jbrown@yelp.com>

git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.4/program@2251 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_tool.c