Index: src/func.c ================================================================== --- src/func.c +++ src/func.c @@ -14,11 +14,11 @@ ** ** There is only one exported symbol in this file - the function ** sqliteRegisterBuildinFunctions() found at the bottom of the file. ** All other code has file scope. ** -** $Id: func.c,v 1.165 2007/08/16 10:09:03 danielk1977 Exp $ +** $Id: func.c,v 1.166 2007/08/16 10:36:34 danielk1977 Exp $ */ #include "sqliteInt.h" #include /* #include */ #include @@ -1063,11 +1063,11 @@ test_destructor_count_var++; assert( nArg==1 ); if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return; len = sqlite3ValueBytes(0, argv[0], ENC(db)); - zVal = sqlite3_malloc(len+3); + zVal = sqlite3MallocZero(len+3); zVal[len] = 0; zVal[len-1] = 0; assert( zVal ); zVal++; memcpy(zVal, sqlite3ValueText(0, argv[0], ENC(db)), len); @@ -1107,11 +1107,11 @@ sqlite3_context *pCtx, int nArg, sqlite3_value **argv ){ int i; - char *zRet = sqlite3_malloc(nArg*2); + char *zRet = sqlite3MallocZero(nArg*2); if( !zRet ) return; for(i=0; iflags = MEM_Null; p->type = SQLITE_NULL; }else{ db->mallocFailed = 1;