1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +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

@@ -3152,6 +3152,8 @@ static int unixRead(
unixFile *pFile = (unixFile *)id;
int got;
assert( id );
assert( offset>=0 );
assert( amt>0 );
/* If this is a database file (not a journal, master-journal or temp
** file), the bytes in the locking range should never be read or written. */