Index: src/os_test.c ================================================================== --- src/os_test.c +++ src/os_test.c @@ -157,10 +157,11 @@ static int cacheBlock(OsTestFile *pFile, int blk){ if( blk>=pFile->nBlk ){ int n = ((pFile->nBlk * 2) + 100 + blk); pFile->apBlk = (u8 **)sqliteRealloc(pFile->apBlk, n * sizeof(u8*)); if( !pFile->apBlk ) return SQLITE_NOMEM; + memset(&pFile->apBlk[pFile->nBlk], 0, (n - pFile->nBlk)*sizeof(u8*)); pFile->nBlk = n; } if( !pFile->apBlk[blk] ){ off_t filesize; Index: src/tclsqlite.c ================================================================== --- src/tclsqlite.c +++ src/tclsqlite.c @@ -9,11 +9,11 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* ** A TCL Interface to SQLite ** -** $Id: tclsqlite.c,v 1.94 2004/06/30 11:54:07 danielk1977 Exp $ +** $Id: tclsqlite.c,v 1.95 2004/06/30 12:42:59 danielk1977 Exp $ */ #ifndef NO_TCL /* Omit this whole file if TCL is unavailable */ #include "sqliteInt.h" #include "tcl.h" @@ -1079,14 +1079,18 @@ ** SQL function. */ #ifdef SQLITE_TEST { extern void Md5_Register(sqlite*); +#ifdef SQLITE_DEBUG int mallocfail = sqlite3_iMallocFail; sqlite3_iMallocFail = 0; +#endif Md5_Register(p->db); +#ifdef SQLITE_DEBUG sqlite3_iMallocFail = mallocfail; +#endif } #endif p->interp = interp; return TCL_OK; }