1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Harden API_ARMOR checks for sqlite3_stmt_scanstatus_v2().

FossilOrigin-Name: d3f38e813ba3b887e973af034713cd58fdfbe07da375b154accc7b5790cfaeda
This commit is contained in:
stephan
2023-10-17 02:15:49 +00:00
parent 08747d44a2
commit b866f98346
3 changed files with 12 additions and 8 deletions

View File

@@ -2351,7 +2351,11 @@ int sqlite3_stmt_scanstatus_v2(
int idx;
#ifdef SQLITE_ENABLE_API_ARMOR
if( p==0 ) return 1;
if( p==0 || pOut==0
|| iScanStatusOp<SQLITE_SCANSTAT_NLOOP
|| iScanStatusOp>SQLITE_SCANSTAT_NCYCLE ){
return 1;
}
#endif
aOp = p->aOp;
nOp = p->nOp;