bareos: bareos-12.4 2848eac9

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