]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commit
src/rrd_client.c: Fix a potential segmentation fault in "get_path".
authorTobias Oetiker <tobi@oetiker.ch>
Wed, 30 Jun 2010 12:48:47 +0000 (12:48 +0000)
committerTobias Oetiker <tobi@oetiker.ch>
Wed, 30 Jun 2010 12:48:47 +0000 (12:48 +0000)
commit6fd4447058d7261a11a333780dd3b8459cc126a0
tree7a45301e13516755cda37d1de6acd5709b74fc49
parent438d9d4b968c1559c857393d1e06b4d4df34035d
src/rrd_client.c: Fix a potential segmentation fault in "get_path".

The "get_path" function is called at least from "rrdc_update" without
checking for a connection first. In that case the "sd_path" pointer may be
NULL, so dereferencing it without checking for NULL is not good behavior.

This patch checks all arguments of the "get_path" function and returns an
error if any pointer is NULL. -- Florian Forster

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