Skip to content

Commit 990dba2

Browse files
authored
Merge pull request ceph#65193 from tchaikov/wip-osd-scrub-fix-buffer-overflow
osd/scrub: fix heap-buffer-overflow when checking digest emptiness Reviewed-by: Jon Bailey <[email protected]> Reviewed-by: Ronen Friedman <[email protected]>
2 parents 7848045 + 100c20b commit 990dba2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/osd/scrubber/scrub_backend.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ ScrubBackend::auth_and_obj_errs_t ScrubBackend::match_in_shards(
12931293
if (std::any_of(
12941294
digests.begin(), digests.end(),
12951295
[](const std::pair<const shard_id_t, ceph::bufferlist&>& digest) {
1296-
return !std::string(digest.second.c_str()).empty();
1296+
return digest.second.length() > 0;
12971297
})) {
12981298
// Unseed all buffers in chunks
12991299
for (auto& [srd, bl] : digests) {

0 commit comments

Comments
 (0)