From: Eric Bollengier Date: Wed, 16 Feb 2022 17:06:33 +0000 (+0100) Subject: cloud: Fix #8807 About crash reported with invalid cloud parmeters X-Git-Tag: Beta-15.0.0~642 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbad8f3089056b5c3b712f374ffc33d243c85363;p=thirdparty%2Fbacula.git cloud: Fix #8807 About crash reported with invalid cloud parmeters --- diff --git a/bacula/src/stored/s3_driver.c b/bacula/src/stored/s3_driver.c index 5d8b1b757..6186a9557 100644 --- a/bacula/src/stored/s3_driver.c +++ b/bacula/src/stored/s3_driver.c @@ -338,7 +338,7 @@ static void responseCompleteCallback( void *callbackCtx) { bacula_ctx *ctx = (bacula_ctx *)callbackCtx; - const char *msg; + const char *msg = NULL; Enter(dbglvl); if (ctx) { @@ -347,7 +347,9 @@ static void responseCompleteCallback( if (status < 0 || status > S3ErrorsSize) { status = (S3Status)S3ErrorsSize; } - msg = oops->message; + if (oops) { + msg = oops->message; + } if (!msg) { msg = S3Errors[status]; }