From: Eric Bollengier Date: Wed, 16 Mar 2022 17:33:32 +0000 (+0100) Subject: Avoid segfault in metaplugin when the plugin command is simplified X-Git-Tag: Release-11.3.2~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f36f67651651d1cb62a9123d7172bf9bd0b4a708;p=thirdparty%2Fbacula.git Avoid segfault in metaplugin when the plugin command is simplified --- diff --git a/bacula/src/plugins/fd/pluginlib/metaplugin.cpp b/bacula/src/plugins/fd/pluginlib/metaplugin.cpp index 499a2e985..269e11694 100644 --- a/bacula/src/plugins/fd/pluginlib/metaplugin.cpp +++ b/bacula/src/plugins/fd/pluginlib/metaplugin.cpp @@ -2229,6 +2229,10 @@ bRC METAPLUGIN::startBackupFile(bpContext *ctx, struct save_pkt *sp) POOL_MEM cmd(PM_FNAME); int reqparams = 2; + if (backend.is_ctx_null()) { + JMSG0(ctx, M_FATAL, "Unable to use the backend properly\n"); + return bRC_Error; + } if (job_cancelled) { return bRC_Error; }