From e9dd48af8a234eec55f05c08de2fcfa58fbd1a3b Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Sun, 24 Feb 2008 19:54:14 +0000 Subject: [PATCH] ebl Fix a segfault when using strip_path option. (Use of pm_strcpy on non-mempool object) git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6483 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/filed/backup.c | 10 +++++----- bacula/technotes-2.3 | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bacula/src/filed/backup.c b/bacula/src/filed/backup.c index 646f17928f..6bad93b1d7 100644 --- a/bacula/src/filed/backup.c +++ b/bacula/src/filed/backup.c @@ -1193,12 +1193,12 @@ static void strip_path(FF_PKT *ff_pkt) if (ff_pkt->type != FT_LNK && ff_pkt->fname != ff_pkt->link) { pm_strcpy(ff_pkt->link_save, ff_pkt->link); if (!do_strip(ff_pkt->strip_path, ff_pkt->link)) { - pm_strcpy(ff_pkt->link, ff_pkt->link_save); - pm_strcpy(ff_pkt->fname, ff_pkt->fname_save); + strcpy(ff_pkt->link, ff_pkt->link_save); + strcpy(ff_pkt->fname, ff_pkt->fname_save); } } } else { - pm_strcpy(ff_pkt->fname, ff_pkt->fname_save); + strcpy(ff_pkt->fname, ff_pkt->fname_save); } Dmsg2(200, "fname=%s stripped=%s\n", ff_pkt->fname_save, ff_pkt->fname); } @@ -1208,8 +1208,8 @@ static void unstrip_path(FF_PKT *ff_pkt) if (!(ff_pkt->flags & FO_STRIPPATH) || ff_pkt->strip_path <= 0) { return; } - pm_strcpy(ff_pkt->fname, ff_pkt->fname_save); + strcpy(ff_pkt->fname, ff_pkt->fname_save); if (ff_pkt->type != FT_LNK && ff_pkt->fname != ff_pkt->link) { - pm_strcpy(ff_pkt->link, ff_pkt->link_save); + strcpy(ff_pkt->link, ff_pkt->link_save); } } diff --git a/bacula/technotes-2.3 b/bacula/technotes-2.3 index 42c300f776..54228393cc 100644 --- a/bacula/technotes-2.3 +++ b/bacula/technotes-2.3 @@ -2,6 +2,8 @@ General: 24Feb08 +ebl Fix a segfault when using strip_path option. (Use of pm_strcpy + on non-mempool object) kes First cut of converting FD .status to work with bat API. New form is: .status client=XXX header -- 2.39.5