mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Fix two potential (and apparently harmless) shift overflows discovered by
the -fcatch-undefined-behavior option of clang. FossilOrigin-Name: e19eead8c9977ed4f00eac54c5bc7e90db78caa8
This commit is contained in:
@@ -4081,7 +4081,7 @@ static int unixShmSystemLock(
|
||||
#ifdef SQLITE_DEBUG
|
||||
{ u16 mask;
|
||||
OSTRACE(("SHM-LOCK "));
|
||||
mask = (1<<(ofst+n)) - (1<<ofst);
|
||||
mask = ofst>31 ? 0xffffffff : (1<<(ofst+n)) - (1<<ofst);
|
||||
if( rc==SQLITE_OK ){
|
||||
if( lockType==F_UNLCK ){
|
||||
OSTRACE(("unlock %d ok", ofst));
|
||||
|
||||
Reference in New Issue
Block a user