From 14211ef84bce1a5d77c61f7f40683b06180df6a2 Mon Sep 17 00:00:00 2001 From: Gal Salomon Date: Mon, 21 Oct 2024 22:12:26 +0300 Subject: [PATCH] remove the code-lines that checking the {ofs,len} bounderies; and modifies them if necessary(invalid read) Signed-off-by: Gal Salomon (cherry picked from commit 2f81b4d618ed5e1d3ab2e985f4d8593b384343c6) --- src/rgw/rgw_s3select.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/rgw/rgw_s3select.cc b/src/rgw/rgw_s3select.cc index f133f7f80169d..f0b26824ca6b3 100644 --- a/src/rgw/rgw_s3select.cc +++ b/src/rgw/rgw_s3select.cc @@ -806,11 +806,6 @@ int RGWSelectObj_ObjStore_S3::parquet_processing(bufferlist& bl, off_t ofs, off_ } append_in_callback += it.length(); ldout(s->cct, 10) << "S3select: part " << part_no++ << " it.length() = " << it.length() << dendl; - if ((ofs + len) > it.length()){ - ldpp_dout(this, 10) << "s3select: offset and length may cause invalid read: ofs = " << ofs << " len = " << len << " it.length() = " << it.length() << dendl; - ofs = 0; - len = it.length(); - } requested_buffer.append(&(it)[0]+ofs, len); } ldout(s->cct, 10) << "S3select:append_in_callback = " << append_in_callback << dendl; -- 2.39.5