1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Fix an off-by-one error in the scratch memory allocator.

FossilOrigin-Name: 5a9591607a0a5ba4527bf2a90179651053244953
This commit is contained in:
drh
2010-09-02 18:13:00 +00:00
parent 1ff6e3ab89
commit 7ff2719e88
3 changed files with 11 additions and 11 deletions

View File

@@ -127,7 +127,7 @@ int sqlite3MallocInit(void){
mem0.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);
}
if( sqlite3GlobalConfig.pScratch && sqlite3GlobalConfig.szScratch>=100
&& sqlite3GlobalConfig.nScratch>=0 ){
&& sqlite3GlobalConfig.nScratch>0 ){
int i, n, sz;
ScratchFreeslot *pSlot;
sz = ROUNDDOWN8(sqlite3GlobalConfig.szScratch);