From: Eric Bollengier Date: Mon, 20 Mar 2023 08:31:32 +0000 (+0100) Subject: Fix #9981 About segfault in bvfs_get_volume() X-Git-Tag: Beta-15.0.0~218 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f74f1f0a9681032ff9313deeddc0e9330186734;p=thirdparty%2Fbacula.git Fix #9981 About segfault in bvfs_get_volume() Introduced with VolType addition. --- diff --git a/bacula/src/cats/bvfs.c b/bacula/src/cats/bvfs.c index 4b074059b..15054d454 100644 --- a/bacula/src/cats/bvfs.c +++ b/bacula/src/cats/bvfs.c @@ -1048,8 +1048,8 @@ void Bvfs::get_volumes(FileId_t fileid) POOL_MEM query; Mmsg(query, -// 7 8 -"SELECT DISTINCT 'L',0,0,0,0,0,0, Media.VolumeName, Media.InChanger " +// 7 8 9 +"SELECT DISTINCT 'L',0,0,0,0,0,0, Media.VolumeName, Media.InChanger, Media.VolType " "FROM File JOIN JobMedia USING (JobId) JOIN Media USING (MediaId) " "WHERE File.FileId = %s " "AND File.FileIndex >= JobMedia.FirstIndex "