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

When a memory allocation fails on the %Q conversion in sqlite3_mprintf(),

make sure the error is reported back up the call stack. (CVS 5933)

FossilOrigin-Name: eebacbc9d7d0625dfbe6367046fa4a0ca9c04e74
This commit is contained in:
drh
2008-11-20 18:20:28 +00:00
parent c7b7f1ae1d
commit d164fd3483
3 changed files with 13 additions and 10 deletions

View File

@@ -5,7 +5,7 @@
** an historical reference. Most of the "enhancements" have been backed
** out so that the functionality is now the same as standard printf().
**
** $Id: printf.c,v 1.95 2008/11/17 19:18:55 danielk1977 Exp $
** $Id: printf.c,v 1.96 2008/11/20 18:20:28 drh Exp $
**
**************************************************************************
**
@@ -645,7 +645,10 @@ void sqlite3VXPrintf(
n += i + 1 + needQuote*2;
if( n>etBUFSIZE ){
bufpt = zExtra = sqlite3Malloc( n );
if( bufpt==0 ) return;
if( bufpt==0 ){
pAccum->mallocFailed = 1;
return;
}
}else{
bufpt = buf;
}