mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Make benign any malloc failures inside the sqlite3_file_control() call within
PRAGMA parsing. Add a couple simple tests for SQLITE_FCNTL_PRAGMA. FossilOrigin-Name: a1f29fa653b788f563967f55c3d20e64cbe3f549
This commit is contained in:
@@ -357,7 +357,9 @@ void sqlite3Pragma(
|
||||
aFcntl[1] = zLeft;
|
||||
aFcntl[2] = zRight;
|
||||
aFcntl[3] = 0;
|
||||
sqlite3BeginBenignMalloc();
|
||||
rc = sqlite3_file_control(db, zDb, SQLITE_FCNTL_PRAGMA, (void*)aFcntl);
|
||||
sqlite3EndBenignMalloc();
|
||||
if( rc==SQLITE_OK ){
|
||||
if( aFcntl[0] ){
|
||||
int mem = ++pParse->nMem;
|
||||
|
||||
Reference in New Issue
Block a user