1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Make sure VdbeFunc entries are initialized before trying to destroy them.

Also, unrelated comment changes in build.c. (CVS 1643)

FossilOrigin-Name: fc3b3a8fe86980db4de402bb8e85f8f739fc3883
This commit is contained in:
drh
2004-06-19 17:33:07 +00:00
parent 124b27e654
commit 0e3d74761d
6 changed files with 66 additions and 28 deletions

View File

@@ -241,6 +241,8 @@ void sqlite3_set_auxdata(
int nMalloc = sizeof(VdbeFunc) + sizeof(struct AuxData)*iArg;
pCtx->pVdbeFunc = pVdbeFunc = sqliteRealloc(pVdbeFunc, nMalloc);
if( !pVdbeFunc ) return;
memset(&pVdbeFunc->apAux[pVdbeFunc->nAux], 0,
sizeof(struct AuxData)*(iArg+1-pVdbeFunc->nAux));
pVdbeFunc->nAux = iArg+1;
pVdbeFunc->pFunc = pCtx->pFunc;
}