mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Correctly detect an OOM occurring in the setDestPgsz() subroutine of
backup. FossilOrigin-Name: d9d8a048d4b621435870b4f8dd13b2938ac2f8fd
This commit is contained in:
@@ -398,7 +398,9 @@ int sqlite3_backup_step(sqlite3_backup *p, int nPage){
|
||||
** is especially important on ZipVFS systems, as in that case it is
|
||||
** not possible to create a database file that uses one page size by
|
||||
** writing to it with another. */
|
||||
if( p->bDestLocked==0 ) setDestPgsz(p);
|
||||
if( p->bDestLocked==0 && rc==SQLITE_OK && setDestPgsz(p)==SQLITE_NOMEM ){
|
||||
rc = SQLITE_NOMEM;
|
||||
}
|
||||
|
||||
/* Lock the destination database, if it is not locked already. */
|
||||
if( SQLITE_OK==rc && p->bDestLocked==0
|
||||
|
Reference in New Issue
Block a user