mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Add test cases to test the libraries handling of corrupt wal-index headers.
FossilOrigin-Name: 9465b267d420120c050bbe4f143ac824146a9e4a
This commit is contained in:
@@ -694,10 +694,8 @@ static int walIteratorInit(Wal *pWal, WalIterator **pp){
|
||||
nByte = sizeof(WalIterator) + (nSegment-1)*sizeof(struct WalSegment) + 512;
|
||||
p = (WalIterator *)sqlite3_malloc(nByte);
|
||||
if( !p ){
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
|
||||
if( p ){
|
||||
rc = SQLITE_NOMEM;
|
||||
}else{
|
||||
memset(p, 0, nByte);
|
||||
p->nSegment = nSegment;
|
||||
|
||||
@@ -718,7 +716,7 @@ static int walIteratorInit(Wal *pWal, WalIterator **pp){
|
||||
}
|
||||
|
||||
*pp = p;
|
||||
return SQLITE_OK;
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user