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/regexp.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/regexp.c')
-rw-r--r-- | ext/misc/regexp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/misc/regexp.c b/ext/misc/regexp.c index b4a8ab5c0..bd82aa5d1 100644 --- a/ext/misc/regexp.c +++ b/ext/misc/regexp.c @@ -225,7 +225,7 @@ static int re_match(ReCompiled *pRe, const unsigned char *zIn, int nIn){ pToFree = 0; aStateSet[0].aState = aSpace; }else{ - pToFree = sqlite3_malloc( sizeof(ReStateNumber)*2*pRe->nState ); + pToFree = sqlite3_malloc64( sizeof(ReStateNumber)*2*pRe->nState ); if( pToFree==0 ) return -1; aStateSet[0].aState = pToFree; } @@ -337,10 +337,10 @@ re_match_end: static int re_resize(ReCompiled *p, int N){ char *aOp; int *aArg; - aOp = sqlite3_realloc(p->aOp, N*sizeof(p->aOp[0])); + aOp = sqlite3_realloc64(p->aOp, N*sizeof(p->aOp[0])); if( aOp==0 ) return 1; p->aOp = aOp; - aArg = sqlite3_realloc(p->aArg, N*sizeof(p->aArg[0])); + aArg = sqlite3_realloc64(p->aArg, N*sizeof(p->aArg[0])); if( aArg==0 ) return 1; p->aArg = aArg; p->nAlloc = N; |