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 | f5c15c58ac07cfe0d72598b88774d47b35755f58 | |
tree | 56649940ff345f282582ca67384928706106db81 | tree | snapshot |
parent | 9a0c94058946b64c78f82a5d65b23c5d7ff0b194 | 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@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@2094 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/src/rrd_client.c | diff | blob | history |