]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.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>
Thu, 18 Sep 2025 18:52:41 +0000 (18:52 +0000)
Fixes: https://tracker.ceph.com/issues/72237
Fixes: https://tracker.ceph.com/issues/72192
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
Resolves: rhbz#2379330
(cherry picked from commit 1cd1bf35659f621e82710a619d743986acbe9e48)

src/client/FSCrypt.cc

index f7ebe8c052cd451185a15bf096606df7e01c2d2d..37ceb5e65c4ab3c290367076ae110974c6acd00a 100644 (file)
@@ -881,6 +881,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;