1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-21 13:38:01 +03:00

Stricter assert() statements on unixShmSystemLock().

FossilOrigin-Name: ed01ed337c04cce4cdbb6e80628b6f716d537e072b80067bd2bd6c5d18a1454f
This commit is contained in:
drh
2025-10-25 11:37:54 +00:00
parent be4d0c2e2f
commit 76db3a6e66
3 changed files with 10 additions and 9 deletions

View File

@@ -4488,7 +4488,8 @@ static int unixShmSystemLock(
/* Locks are within range */
assert( n>=1 && n<=SQLITE_SHM_NLOCK );
assert( ofst>=UNIX_SHM_BASE && ofst<=(UNIX_SHM_DMS+SQLITE_SHM_NLOCK) );
assert( ofst>=UNIX_SHM_BASE && ofst<=UNIX_SHM_DMS );
assert( ofst+n-1<=UNIX_SHM_DMS );
if( pShmNode->hShm>=0 ){
int res;