From: Kern Sibbald Date: Thu, 6 Feb 2003 23:04:21 +0000 (+0000) Subject: Fix Internal DB crash X-Git-Tag: Release-1.30~127 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ffaa2f97bb17368bb86bb39dccec653d914aa401;p=bacula%2Fbacula Fix Internal DB crash git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@340 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/cats/bdb_get.c b/bacula/src/cats/bdb_get.c index 7c4e0f4d0e..b1a0b3a7b3 100644 --- a/bacula/src/cats/bdb_get.c +++ b/bacula/src/cats/bdb_get.c @@ -369,7 +369,7 @@ int db_get_job_volume_names(void *jcr, B_DB *mdb, uint32_t JobId, POOLMEM **Volu } jmlen = sizeof(jm); mrlen = sizeof(mr); - *VolumeNames = 0; + *VolumeNames[0] = 0; fseek(mdb->jobmediafd, 0L, SEEK_SET); /* rewind the file */ while (fread(&jm, jmlen, 1, mdb->jobmediafd) > 0) { if (jm.JobId == JobId) { @@ -377,7 +377,7 @@ int db_get_job_volume_names(void *jcr, B_DB *mdb, uint32_t JobId, POOLMEM **Volu fseek(mdb->mediafd, 0L, SEEK_SET); while (fread(&mr, mrlen, 1, mdb->mediafd) > 0) { if (jm.MediaId == mr.MediaId) { - if (*VolumeNames != 0) { /* if not first name, */ + if (*VolumeNames[0] != 0) { /* if not first name, */ pm_strcat(VolumeNames, "|"); /* add separator */ } pm_strcat(VolumeNames, mr.VolumeName); /* add Volume Name */