mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Make use of the sqlite3GetBoolean() interface for more robust processing
of the readonly_shm query parameter inside of unixShmMap(). FossilOrigin-Name: 1f930d7e04cd4a5ff3d91a0e9f1b62114f1cebd2
This commit is contained in:
@@ -3787,7 +3787,7 @@ static int unixOpenSharedMemory(unixFile *pDbFd){
|
||||
if( pShmNode->h<0 ){
|
||||
const char *zRO;
|
||||
zRO = sqlite3_uri_parameter(pDbFd->zPath, "readonly_shm");
|
||||
if( zRO && (zRO[0]!='0' || zRO[1]!=0) ){
|
||||
if( zRO && sqlite3GetBoolean(zRO) ){
|
||||
pShmNode->h = robust_open(zShmFilename, O_RDONLY,
|
||||
(sStat.st_mode & 0777));
|
||||
pShmNode->isReadonly = 1;
|
||||
|
||||
Reference in New Issue
Block a user