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 | b47c2e44707f965100a561660a45f89b5759cbc1 | |
tree | b06e4cd18cc67b125a421d1368273dd768be7224 | tree | snapshot |
parent | 1be77c55cf81738e057f1b1180357edecda89e6f | 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/trunk/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/trunk/program@2094 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_client.c | diff | blob | history |