From: Kern Sibbald Date: Thu, 17 Sep 2009 14:21:03 +0000 (+0200) Subject: Fix seg fault in ignoredir code X-Git-Tag: Release-3.0.3~80 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8dc209873ada693a0cb233145f6cd273e877bd4b;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) {