Merge pull request #2636 from jzhou77/valgrind-fix
Fix valgrind found error of reading uninitialized data
This commit is contained in:
commit
2b81b128f0
|
@ -32,7 +32,10 @@ public:
|
|||
|
||||
// For read() and write(), the data buffer must remain valid until the future is ready
|
||||
Future<int> read( void* data, int length, int64_t offset ) {
|
||||
return map(m_f->read(data, length, offset), [=](int r) { updateChecksumHistory(false, offset, length, (uint8_t *)data); return r; });
|
||||
return map(m_f->read(data, length, offset), [=](int r) {
|
||||
updateChecksumHistory(false, offset, r, (uint8_t*)data);
|
||||
return r;
|
||||
});
|
||||
}
|
||||
Future<Void> readZeroCopy( void** data, int* length, int64_t offset ) {
|
||||
return map(m_f->readZeroCopy(data, length, offset), [=](Void r) { updateChecksumHistory(false, offset, *length, (uint8_t *)data); return r; });
|
||||
|
|
Loading…
Reference in New Issue