Merge pull request #34660 from majianpeng/bluestore-pmemdevice

os/bluestore: avoid offset overflow.

Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2020-05-05 12:59:50 +08:00 committed by GitHub
commit 61ad4e6bb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);