diff options
author | drh <drh@noemail.net> | 2019-01-08 20:02:48 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2019-01-08 20:02:48 +0000 |
commit | 2d77d80a65a2da89d58c04f91aa282d432d5c919 (patch) | |
tree | 8a793c3cfd1f4ce2adf7df3e78be038ad48469d6 /ext/misc/json1.c | |
parent | c930b405f0717d5f8626dd846f3ab1d2a7243195 (diff) | |
download | sqlite-2d77d80a65a2da89d58c04f91aa282d432d5c919.tar.gz sqlite-2d77d80a65a2da89d58c04f91aa282d432d5c919.zip |
Use 64-bit math to compute the sizes of memory allocations in extensions.
FossilOrigin-Name: ca67f2ec0e294384c397db438605df1b47aae5f348a8de94f97286997625d169
Diffstat (limited to 'ext/misc/json1.c')
-rw-r--r-- | ext/misc/json1.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/misc/json1.c b/ext/misc/json1.c index a5b454916..d99d360b2 100644 --- a/ext/misc/json1.c +++ b/ext/misc/json1.c @@ -691,7 +691,7 @@ static JSON_NOINLINE int jsonParseAddNodeExpand( assert( pParse->nNode>=pParse->nAlloc ); if( pParse->oom ) return -1; nNew = pParse->nAlloc*2 + 10; - pNew = sqlite3_realloc(pParse->aNode, sizeof(JsonNode)*nNew); + pNew = sqlite3_realloc64(pParse->aNode, sizeof(JsonNode)*nNew); if( pNew==0 ){ pParse->oom = 1; return -1; @@ -965,7 +965,7 @@ static void jsonParseFillInParentage(JsonParse *pParse, u32 i, u32 iParent){ static int jsonParseFindParents(JsonParse *pParse){ u32 *aUp; assert( pParse->aUp==0 ); - aUp = pParse->aUp = sqlite3_malloc( sizeof(u32)*pParse->nNode ); + aUp = pParse->aUp = sqlite3_malloc64( sizeof(u32)*pParse->nNode ); if( aUp==0 ){ pParse->oom = 1; return SQLITE_NOMEM; @@ -1027,7 +1027,7 @@ static JsonParse *jsonParseCached( pMatch->iHold = iMaxHold+1; return pMatch; } - p = sqlite3_malloc( sizeof(*p) + nJson + 1 ); + p = sqlite3_malloc64( sizeof(*p) + nJson + 1 ); if( p==0 ){ sqlite3_result_error_nomem(pCtx); return 0; |