bareos/bareos — pull request #10 by wellwet (2013-12-19 21:43:23+00:00)
Title: Fixed segfault when config file can't be opened.

There is a bug in parse_config() resulting in segfault when config file can't be opened e.g. one has unsufficient permissions. First, lc->str points to NULL (due to memset of newly allocated LEX structure) but then it is used as a destination in bstrncpy(). Second, max size in the same bstrncpy() call is wrong - sizeof of lc->str is a sizeof of pointer not buffer.