bareos: master f07c45cb

Author Committer Branch Timestamp Parent
Andre Noll mvwieringen adm master 2013-07-05 14:39 master 7cd29218 Pending
Changeset sd: Avoid segfault in is_vol_in_autochanger().

If the sd config file contains a Device section for a device not
listed in the Autochanger config section, is_vol_in_autochanger()
might be called with vol->dev->device->changer_res being NULL.
However, the function dereferences this pointer unconditionally,
which results in a segfault.

This patch adds the necessary check and returns false in this case,
avoiding the crash.

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
mod - src/stored/reserve.c Diff File