bareos: bareos-13.2 669f1532

Author Committer Branch Timestamp Parent
Andre Noll mvwieringen adm bareos-13.2 2013-07-05 14:39 bareos-13.2 301891cd 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