diff --git a/fs_mgr/libsnapshot/snapuserd/user-space-merge/read_worker.cpp b/fs_mgr/libsnapshot/snapuserd/user-space-merge/read_worker.cpp index 7268fca1e..7d2e3a613 100644 --- a/fs_mgr/libsnapshot/snapuserd/user-space-merge/read_worker.cpp +++ b/fs_mgr/libsnapshot/snapuserd/user-space-merge/read_worker.cpp @@ -305,7 +305,7 @@ bool ReadWorker::ReadAlignedSector(sector_t sector, size_t sz) { return false; } - ret = BLOCK_SZ; + ret = std::min(BLOCK_SZ, read_size); } read_size -= ret;