diff options
author | drh <drh@noemail.net> | 2019-02-01 21:08:27 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2019-02-01 21:08:27 +0000 |
commit | 7ba03ea15aa0adee1cce6eb4ffe4df8046cb3271 (patch) | |
tree | f0bc913cf964e8521695b0096c46c59d00fe59fe /src/printf.c | |
parent | 2964225247f1b9418aef50a042b2997edb3b6ad6 (diff) | |
download | sqlite-7ba03ea15aa0adee1cce6eb4ffe4df8046cb3271.tar.gz sqlite-7ba03ea15aa0adee1cce6eb4ffe4df8046cb3271.zip |
Slight adjustment to the printf formatter large memory allocation detector
so that it does not overestimate the amount of space needed for
oversize %d conversions.
FossilOrigin-Name: 1aee70d6de8a9b17ebb74a7cb1dad65139cde1b615dcce4d15d3a476fda8676b
Diffstat (limited to 'src/printf.c')
-rw-r--r-- | src/printf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/printf.c b/src/printf.c index c732e8be2..f11fb6664 100644 --- a/src/printf.c +++ b/src/printf.c @@ -442,7 +442,9 @@ void sqlite3_str_vappendf( nOut = etBUFSIZE; zOut = buf; }else{ - u64 n = (u64)precision + 10 + precision/3; + u64 n; + n = (u64)precision + 10; + if( cThousand ) n += precision/3; zOut = zExtra = printfTempBuf(pAccum, n); if( zOut==0 ) return; nOut = (int)n; |