This fixes the issue with bufferlist copy overflow in the `copy-object`
Op path.
Resolves: rhbz#
2321269
Reviewed-by: Marcus Watts <mwatts@redhat.com>
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
(cherry picked from commit
95ac4e63be73790474c03d3cd314fec7983f12e9)
return -EIO;
}
bufferlist out_bl, in_bl, temp_in_bl;
- bl.begin(bl_ofs).copy(bl_len, temp_in_bl);
+ bl.begin().copy(bl_len, temp_in_bl);
bl_ofs = 0;
int r = 0;
if (waiting.length() != 0) {
int RGWGetObj_BlockDecrypt::handle_data(bufferlist& bl, off_t bl_ofs, off_t bl_len) {
ldpp_dout(this->dpp, 25) << "Decrypt " << bl_len << " bytes" << dendl;
- bl.begin(bl_ofs).copy(bl_len, cache);
+ bl.begin().copy(bl_len, cache);
int res = 0;
size_t part_ofs = ofs;
}
uint64_t read_len = bl_len;
bufferlist copy;
- bl.begin(bl_ofs).copy(bl_len, copy);
+ bl.begin().copy(read_len, copy);
int ret = processor->process(std::move(copy), ofs);
if (ret < 0) return ret;
ofs += read_len;