author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 30 Jun 2010 12:48:47 +0000 (12:48 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 30 Jun 2010 12:48:47 +0000 (12:48 +0000) | ||
commit | 6d9decb43ae7461a33f1cee9f9c4fd53e1afda64 | |
tree | 7a45301e13516755cda37d1de6acd5709b74fc49 | tree | snapshot |
parent | f1d5b0d7a4e92ce1e5971e7f9ddbdc6f63b1cea2 | commit | diff |
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
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 | diff | blob | history |