From: Eric Bollengier Date: Thu, 30 Jul 2009 09:57:39 +0000 (+0200) Subject: fix segfault X-Git-Tag: Release-5.0.0~358 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1c8bcb34ac87e63ca802b5818955e5d685c43962;p=bacula%2Fbacula fix segfault --- diff --git a/bacula/src/filed/accurate.c b/bacula/src/filed/accurate.c index 33f9b52c74..d4dafc1240 100644 --- a/bacula/src/filed/accurate.c +++ b/bacula/src/filed/accurate.c @@ -203,7 +203,7 @@ static bool accurate_add_file(JCR *jcr, char *fname, char *lstat) memcpy(item, &elt, sizeof(CurFile)); item->fname = (char *)item+sizeof(CurFile); strcpy(item->fname, fname); - item->fname = item->fname+strlen(item->fname)+1; + item->lstat = item->fname+strlen(item->fname)+1; strcpy(item->lstat, lstat); jcr->file_list->insert(item->fname, item); @@ -362,7 +362,7 @@ bool accurate_check_file(JCR *jcr, FF_PKT *ff_pkt) if (statc.st_mtime != ff_pkt->statp.st_mtime) { // Jmsg(jcr, M_SAVED, 0, _("%s st_mtime differs\n"), fname); Dmsg3(dbglvl, "%s st_mtime differs (%lld!=%lld)\n", - fname, elt.mtime, (utime_t)ff_pkt->statp.st_mtime); + fname, statc.st_mtime, (utime_t)ff_pkt->statp.st_mtime); stat = true; } else if (!(ff_pkt->flags & FO_MTIMEONLY) && (statc.st_ctime != ff_pkt->statp.st_ctime)) {