diff options
author | drh <> | 2021-03-02 21:07:41 +0000 |
---|---|---|
committer | drh <> | 2021-03-02 21:07:41 +0000 |
commit | bb05976dac48ab37a486dc4b839e6f85773d74e0 (patch) | |
tree | 3d7e77b8be1e5d0b005bd1a37004da47b09eb07e /src/printf.c | |
parent | 898ec7927ae4d25083d5a034c5ce536cfbd0cb42 (diff) | |
download | sqlite-bb05976dac48ab37a486dc4b839e6f85773d74e0.tar.gz sqlite-bb05976dac48ab37a486dc4b839e6f85773d74e0.zip |
Cast a string size variable to 64-bit to avoid any possibility of
integer overflow.
FossilOrigin-Name: a5940294b2ac8d157d7fa72f65ee70b713f7feb8a0a98d7f47e71acd1b6942b1
Diffstat (limited to 'src/printf.c')
-rw-r--r-- | src/printf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/printf.c b/src/printf.c index 476d13e78..9aab863ed 100644 --- a/src/printf.c +++ b/src/printf.c @@ -921,7 +921,7 @@ static int sqlite3StrAccumEnlarge(StrAccum *p, int N){ }else{ char *zOld = isMalloced(p) ? p->zText : 0; i64 szNew = p->nChar; - szNew += N + 1; + szNew += (sqlite3_int64)N + 1; if( szNew+p->nChar<=p->mxAlloc ){ /* Force exponential buffer size growth as long as it does not overflow, ** to avoid having to call this routine too often */ |