mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Make sure the %z optimization for printf() is not invoked if there has been
a prior error (SQLITE_NOMEM or SQLITE_TOOBIG) associated with the same printf() call. FossilOrigin-Name: a2304a3474b0ca35eee0af64286ce2f7cb24d181323e128d5f04f7fe6e1c0980
This commit is contained in:
@@ -686,7 +686,12 @@ void sqlite3_str_vappendf(
|
||||
if( bufpt==0 ){
|
||||
bufpt = "";
|
||||
}else if( xtype==etDYNSTRING ){
|
||||
if( pAccum->nChar==0 && pAccum->mxAlloc && width==0 && precision<0 ){
|
||||
if( pAccum->nChar==0
|
||||
&& pAccum->mxAlloc
|
||||
&& width==0
|
||||
&& precision<0
|
||||
&& pAccum->accError==0
|
||||
){
|
||||
/* Special optimization for sqlite3_mprintf("%z..."):
|
||||
** Extend an existing memory allocation rather than creating
|
||||
** a new one. */
|
||||
|
||||
Reference in New Issue
Block a user