summaryrefslogtreecommitdiff
path: root/bus/config-parser.c
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2015-04-14 23:48:23 +0200
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2015-04-16 13:15:19 +0100
commit26a3c0dc5b2ad10e22a0c5b4a745e5b008bee2b7 (patch)
tree3e208a214212d0f9812b8965cd0fd7637f842e4a /bus/config-parser.c
parent15e6b4f5b5a3a8ac02b3582519b044024cd350af (diff)
downloaddbus-26a3c0dc5b2ad10e22a0c5b4a745e5b008bee2b7.tar.gz
include_dir: skip processing on error (CID 54744)
We already skipped processing for DBUS_ERROR_FILE_NOT_FOUND; but if the error was something else, we would pass the NULL pointer dir to _dbus_directory_get_next_file(), which dereferences it. Reported by Coverity: CID 54744: Dereference after null check (FORWARD_NULL) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021 [smcv: re-worded commit message] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'bus/config-parser.c')
-rw-r--r--bus/config-parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bus/config-parser.c b/bus/config-parser.c
index 1540fe43..3f59730b 100644
--- a/bus/config-parser.c
+++ b/bus/config-parser.c
@@ -2271,6 +2271,8 @@ include_dir (BusConfigParser *parser,
dbus_error_free (error);
goto success;
}
+ else
+ goto failed;
}
dbus_error_init (&tmp_error);