From: Kern Sibbald Date: Fri, 11 Apr 2003 10:08:03 +0000 (+0000) Subject: Fix bad bstrncpy X-Git-Tag: Release-1.30~33 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c462b3302e024be45f96d29e49341514fc37b0b1;p=bacula%2Fbacula Fix bad bstrncpy git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@434 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/stored/askdir.c b/bacula/src/stored/askdir.c index 971dc96975..c0e3470a42 100644 --- a/bacula/src/stored/askdir.c +++ b/bacula/src/stored/askdir.c @@ -95,7 +95,7 @@ static int do_request_volume_info(JCR *jcr) return 0; } unbash_spaces(vol->VolCatName); - strcpy(jcr->VolumeName, vol->VolCatName); /* set desired VolumeName */ + pm_strcpy(&jcr->VolumeName, vol->VolCatName); /* set desired VolumeName */ Dmsg2(200, "do_reqest_vol_info got slot=%d Volume=%s\n", vol->Slot, vol->VolCatName); diff --git a/bacula/src/stored/mount.c b/bacula/src/stored/mount.c index a332b7a631..1d5905f043 100644 --- a/bacula/src/stored/mount.c +++ b/bacula/src/stored/mount.c @@ -185,7 +185,7 @@ read_volume: */ memcpy(&dev->VolCatInfo, &jcr->VolCatInfo, sizeof(jcr->VolCatInfo)); /* Check if this is a valid Volume in the pool */ - bstrncpy(jcr->VolumeName, dev->VolHdr.VolName, sizeof(jcr->VolumeName)); + pm_strcpy(&jcr->VolumeName, dev->VolHdr.VolName); if (!dir_get_volume_info(jcr, 1)) { Mmsg(&jcr->errmsg, _("Wanted Volume \"%s\".\n" " Current Volume \"%s\" not acceptable because:\n"