From 55827fea8886a8db8fe77f548fae84617287215b Mon Sep 17 00:00:00 2001 From: Jianpeng Ma Date: Tue, 21 Apr 2020 13:33:45 +0800 Subject: [PATCH] os/bluestore: avoid offset overflow. Reported-by: Xiaoping Duan Signed-off-by: Jianpeng Ma --- src/os/bluestore/PMEMDevice.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/bluestore/PMEMDevice.cc b/src/os/bluestore/PMEMDevice.cc index 0216b35ca854..3cdcacc047c6 100644 --- a/src/os/bluestore/PMEMDevice.cc +++ b/src/os/bluestore/PMEMDevice.cc @@ -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); -- 2.47.3