1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Make sure the name of rollback journal files are double-zero terminated

when they are passed into the VFS.

FossilOrigin-Name: 8711a8447d28275602287faf533de3d6e50d535d
This commit is contained in:
drh
2012-09-15 13:39:24 +00:00
parent 5f08526937
commit 55b4c226d1
3 changed files with 8 additions and 8 deletions

View File

@@ -4448,7 +4448,7 @@ int sqlite3PagerOpen(
memcpy(pPager->zFilename, zPathname, nPathname);
if( nUri ) memcpy(&pPager->zFilename[nPathname+1], zUri, nUri);
memcpy(pPager->zJournal, zPathname, nPathname);
memcpy(&pPager->zJournal[nPathname], "-journal\000", 8+1);
memcpy(&pPager->zJournal[nPathname], "-journal\000", 8+2);
sqlite3FileSuffix3(pPager->zFilename, pPager->zJournal);
#ifndef SQLITE_OMIT_WAL
pPager->zWal = &pPager->zJournal[nPathname+8+1];