mirror of
https://github.com/ceph/ceph
synced 2025-02-19 00:47:49 +00:00
Merge PR #53053 into main
* refs/pull/53053/head: libcephsqlite: fill 0s in unread portion of buffer Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
commit
4a6f6ed0f3
@ -353,7 +353,7 @@ static int Read(sqlite3_file *file, void *buf, int len, sqlite_int64 off)
|
||||
auto end = ceph::coarse_mono_clock::now();
|
||||
getdata(f->vfs).logger->tinc(P_OPF_READ, end-start);
|
||||
if (rc < len) {
|
||||
memset(buf, 0, len-rc);
|
||||
memset((unsigned char*)buf+rc, 0, len-rc);
|
||||
return SQLITE_IOERR_SHORT_READ;
|
||||
} else {
|
||||
return SQLITE_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user