1
0
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:
drh
2012-02-22 18:21:20 +00:00
parent 3fa9730273
commit e4d25e9cfb
4 changed files with 18 additions and 14 deletions

View File

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