mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Code changes that make it easier to prove that no 32-bit integer overflows
happen during memory allocation. No problems fixed; this change is just to make future maintenance easier. FossilOrigin-Name: 215650a5a1d55bdbca9c92524804a1a54456a17f42a17e53747b21a6507506f5
This commit is contained in:
@@ -753,7 +753,7 @@ static SQLITE_NOINLINE int walIndexPageRealloc(
|
||||
|
||||
/* Enlarge the pWal->apWiData[] array if required */
|
||||
if( pWal->nWiData<=iPage ){
|
||||
sqlite3_int64 nByte = sizeof(u32*)*(iPage+1);
|
||||
sqlite3_int64 nByte = sizeof(u32*)*(1+(i64)iPage);
|
||||
volatile u32 **apNew;
|
||||
apNew = (volatile u32 **)sqlite3Realloc((void *)pWal->apWiData, nByte);
|
||||
if( !apNew ){
|
||||
|
Reference in New Issue
Block a user