]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
cloud: Fix #8807 About crash reported with invalid cloud parmeters
authorEric Bollengier <eric@baculasystems.com>
Wed, 16 Feb 2022 17:06:33 +0000 (18:06 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:57 +0000 (13:56 +0200)
bacula/src/stored/s3_driver.c

index 5d8b1b75799a2edc0043f1131d8829d4c5946589..6186a95572305bc8dc8f1e4a8aa06f5125313a77 100644 (file)
@@ -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];
    }