1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00

Add assert()s to the implementation of xRead() in the built-in VFSes to

verify that the offset parameter is always non-negative.

FossilOrigin-Name: cf5c3642247fdd34d87f0368594cd7b8f081636a
This commit is contained in:
drh
2013-05-09 18:12:40 +00:00
parent b3129fa560
commit 6cf9d8d63a
4 changed files with 11 additions and 8 deletions

View File

@@ -2157,6 +2157,7 @@ static int winRead(
assert( id!=0 );
assert( amt>0 );
assert( offset>=0 );
SimulateIOError(return SQLITE_IOERR_READ);
OSTRACE(("READ file=%p, buffer=%p, amount=%d, offset=%lld, lock=%d\n",
pFile->h, pBuf, amt, offset, pFile->locktype));