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

Make sure the name of the shared memory file has two zero-terminators in the

UNIX VFS, so that sqlite3_uri_parameter() will work correctly on that name.

FossilOrigin-Name: 3d088ba5e36c0b6bccc86986f8fa9a22b340c297
This commit is contained in:
drh
2012-01-05 21:19:54 +00:00
parent e025d9a096
commit 9cb5a0d989
3 changed files with 8 additions and 8 deletions

View File

@@ -3872,7 +3872,7 @@ static int unixOpenSharedMemory(unixFile *pDbFd){
rc = SQLITE_NOMEM;
goto shm_open_err;
}
memset(pShmNode, 0, sizeof(*pShmNode));
memset(pShmNode, 0, sizeof(*pShmNode)+nShmFilename);
zShmFilename = pShmNode->zFilename = (char*)&pShmNode[1];
#ifdef SQLITE_SHM_DIRECTORY
sqlite3_snprintf(nShmFilename, zShmFilename,