From: Kern Sibbald Date: Thu, 17 Sep 2009 14:21:03 +0000 (+0200) Subject: Fix seg fault in ignoredir code X-Git-Tag: Release-5.0.0~300^2~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ccce64485b0dda68fff780bfe325ee8ec40eb9cb;p=bacula%2Fbacula Fix seg fault in ignoredir code --- diff --git a/bacula/src/findlib/find_one.c b/bacula/src/findlib/find_one.c index f4f2e7be80..36cfa6c8b8 100644 --- a/bacula/src/findlib/find_one.c +++ b/bacula/src/findlib/find_one.c @@ -303,7 +303,13 @@ static bool have_ignoredir(FF_PKT *ff_pkt) { struct stat sb; char tmp_name[MAXPATHLEN]; - char *ignoredir = ff_pkt->fileset->incexe->ignoredir; + char *ignoredir; + + /* Ensure that pointers are defined */ + if (!ff_pkt->fileset || !ff_pkt->fileset->incexe) { + return false; + } + ignoredir = ff_pkt->fileset->incexe->ignoredir; if (ignoredir) { if (strlen(ff_pkt->fname) + strlen(ignoredir) + 2 > MAXPATHLEN) {