diff options
author | drh <drh@noemail.net> | 2013-05-09 18:12:40 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2013-05-09 18:12:40 +0000 |
commit | 6cf9d8d63a37c4990838d8ac660529f27ef3cba9 (patch) | |
tree | 03e9c0595249df5a0b102d49c2cc01eb2b98dca1 /src/os_unix.c | |
parent | b3129fa560d12ae44cb0a992a4a4b4980da1e494 (diff) | |
download | sqlite-6cf9d8d63a37c4990838d8ac660529f27ef3cba9.tar.gz sqlite-6cf9d8d63a37c4990838d8ac660529f27ef3cba9.zip |
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
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 6eed67407..30d79f0c5 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -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. */ |