]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix seg fault in ignoredir code
authorKern Sibbald <kern@sibbald.com>
Thu, 17 Sep 2009 14:21:03 +0000 (16:21 +0200)
committerKern Sibbald <kern@sibbald.com>
Thu, 17 Sep 2009 14:21:03 +0000 (16:21 +0200)
bacula/src/findlib/find_one.c

index f4f2e7be804638f3f78fe2a7917b7256c418781d..36cfa6c8b86b5731c09a71a270314b3fc40fd982 100644 (file)
@@ -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) {