aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2012-01-05 21:19:54 +0000
committerdrh <drh@noemail.net>2012-01-05 21:19:54 +0000
commit9cb5a0d989252d27ca0a2ef92d3fc06089e48adb (patch)
tree2d3937ef8e4c0808a4098dae3df44a542899f690 /src/os_unix.c
parente025d9a096885a825677796f4bfc8bf08bdf59a0 (diff)
downloadsqlite-9cb5a0d989252d27ca0a2ef92d3fc06089e48adb.tar.gz
sqlite-9cb5a0d989252d27ca0a2ef92d3fc06089e48adb.zip
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
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 9a3cdfb9b..1275ae10c 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -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,