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 | e198e3beff0d2dbf4ffaf5a78f9d87bccfeebb7a | |
tree | 5670b9327945bd7a4c64768f170a161796802dea | tree | snapshot |
parent | ca1f553e88759035a1b6f6419d85f072efac516d | 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@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@2094 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/src/rrd_client.c | diff | blob | history |