]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: skip fscrypt decrypt_bl if data bl is empty.
authorChristopher Hoffman <choffman@redhat.com>
Wed, 23 Jul 2025 19:11:31 +0000 (19:11 +0000)
committerChristopher Hoffman <choffman@redhat.com>
Wed, 5 Nov 2025 13:59:36 +0000 (13:59 +0000)
Fixes: https://tracker.ceph.com/issues/72237
Fixes: https://tracker.ceph.com/issues/72192
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
src/client/FSCrypt.cc

index edb38898affafe252c62e4c0d11ae86449eae9ad..1e10085d8ee8b2cd0c6be5ebacc1fceff3409246 100644 (file)
@@ -882,6 +882,8 @@ int FSCryptFNameDenc::get_decrypted_symlink(const std::string& b64enc, std::stri
 int FSCryptFDataDenc::decrypt_bl(uint64_t off, uint64_t len, uint64_t pos, const std::vector<Segment>& holes, bufferlist *bl)
 {
   auto data_len = bl->length();
+  if (data_len == 0)
+    return 0;
 
   auto target_end = off + len;