os/bluestore: avoid offset overflow.

Reported-by: Xiaoping Duan <xiaoping.duan@intel.com>
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
This commit is contained in:
Jianpeng Ma 2020-04-21 13:33:45 +08:00
parent 18734afab0
commit 55827fea88

View File

@ -201,7 +201,7 @@ int PMEMDevice::write(uint64_t off, bufferlist& bl, bool buffered, int write_hin
}
bufferlist::iterator p = bl.begin();
uint32_t off1 = off;
uint64_t off1 = off;
while (len) {
const char *data;
uint32_t l = p.get_ptr_and_advance(len, &data);