From: Vedansh Bhartia Date: Thu, 13 Jul 2023 08:13:29 +0000 (+0530) Subject: rgw: Fix potential null dereference error in bucket name parsing X-Git-Tag: v19.0.0~825^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=df06f3cc8c1f308feb65f902ac4526163ad16834;p=ceph.git rgw: Fix potential null dereference error in bucket name parsing Signed-off-by: Vedansh Bhartia --- diff --git a/src/rgw/driver/rados/rgw_bucket.cc b/src/rgw/driver/rados/rgw_bucket.cc index b1dd9fe1cdad..686b7223b876 100644 --- a/src/rgw/driver/rados/rgw_bucket.cc +++ b/src/rgw/driver/rados/rgw_bucket.cc @@ -63,7 +63,7 @@ static void parse_bucket(const string& bucket, /* * deal with the possible tenant:bucket:bucket_instance case */ - if (tenant_name->empty()) { + if (tenant_name->empty() && bucket_instance) { pos = bucket_instance->find(':'); if (pos >= 0) { *tenant_name = *bucket_name;