1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-21 11:13:54 +03:00

More efficient implementation of large precisions on the "%c" format for

the built-in printf().  This is an effort to avoid a reported
timeout on a (ridiculous) query generated by OSSFuzz.

FossilOrigin-Name: 371f9b88387a44a5f820279d79733d1deb7eafc72f320ec47a11679bbdbb49ef
This commit is contained in:
drh
2022-12-21 19:11:56 +00:00
parent fe83892bc1
commit 79b9bc4452
5 changed files with 31 additions and 18 deletions

View File

@@ -1082,7 +1082,7 @@ void sqlite3QuoteValue(StrAccum *pStr, sqlite3_value *pValue){
}
case SQLITE_BLOB: {
char const *zBlob = sqlite3_value_blob(pValue);
int nBlob = sqlite3_value_bytes(pValue);
i64 nBlob = sqlite3_value_bytes(pValue);
assert( zBlob==sqlite3_value_blob(pValue) ); /* No encoding change */
sqlite3StrAccumEnlarge(pStr, nBlob*2 + 4);
if( pStr->accError==0 ){