bareos: bareos-13.2 4072d085

Author Committer Branch Timestamp Parent
Andre Noll Marco van Wieringen bareos-13.2 2013-07-05 16:39 bareos-13.2 970ca6cd 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