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

Fix a possible segfault when backing up an encrypted database. (CVS 6785)

FossilOrigin-Name: 7d8f178c8145b90da31f6557f7cd99d154eb676e
This commit is contained in:
drh
2009-06-19 02:25:48 +00:00
parent 37b89a0186
commit 0472b5ad3f
3 changed files with 10 additions and 10 deletions

View File

@@ -18,7 +18,7 @@
** file simultaneously, or one process from reading the database while
** another is writing.
**
** @(#) $Id: pager.c,v 1.596 2009/06/19 00:33:32 drh Exp $
** @(#) $Id: pager.c,v 1.597 2009/06/19 02:25:49 drh Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
@@ -1533,9 +1533,9 @@ static int pager_playback_one_page(
pPager->dbFileSize = pgno;
}
if( pPager->pBackup ){
CODEC1(pPager, aData, pPg->pgno, 3, rc=SQLITE_NOMEM);
CODEC1(pPager, aData, pgno, 3, rc=SQLITE_NOMEM);
sqlite3BackupUpdate(pPager->pBackup, pgno, aData);
CODEC1(pPager, aData, pPg->pgno, 0, rc=SQLITE_NOMEM);
CODEC1(pPager, aData, pgno, 0, rc=SQLITE_NOMEM);
}
}else if( !isMainJrnl && pPg==0 ){
/* If this is a rollback of a savepoint and data was not written to