1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

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
This commit is contained in:
drh
2019-02-01 21:08:27 +00:00
parent 2964225247
commit 7ba03ea15a
3 changed files with 10 additions and 8 deletions

View File

@@ -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;