diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/os_unix.c | 2 | ||||
-rw-r--r-- | src/os_win.c | 1 |
2 files changed, 3 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. */ diff --git a/src/os_win.c b/src/os_win.c index e30824815..66f070387 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -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)); |