From: Eric Bollengier Date: Tue, 3 May 2022 13:14:59 +0000 (+0200) Subject: Fix org#2658 About segfault with bsdjson with incorrect parameters X-Git-Tag: Release-13.0.0~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84ee4a577a786d1675138218ffebfde617723878;p=thirdparty%2Fbacula.git Fix org#2658 About segfault with bsdjson with incorrect parameters --- diff --git a/bacula/src/stored/bsdjson.c b/bacula/src/stored/bsdjson.c index f58861688..457052218 100644 --- a/bacula/src/stored/bsdjson.c +++ b/bacula/src/stored/bsdjson.c @@ -589,7 +589,7 @@ static int check_resources() OK = false; } - if (!me->messages) { + if (me && !me->messages) { me->messages = (MSGS *)GetNextRes(R_MSGS, NULL); if (!me->messages) { Jmsg1(NULL, M_ERROR, 0, _("No Messages resource defined in %s. Cannot continue.\n"), @@ -598,7 +598,7 @@ static int check_resources() } } - if (!me->working_directory) { + if (me && !me->working_directory) { Jmsg1(NULL, M_ERROR, 0, _("No Working Directory defined in %s. Cannot continue.\n"), configfile); OK = false;