1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

Do not accept a string that looks like a number used as an argument to

PRAGMA integrity_check as a number.  Treat it as a table name that just
happens to look like a number.

FossilOrigin-Name: b04e7a23478f1012e501a810f3e09cca81a66e802f5f72cae80c81120174e2cb
This commit is contained in:
drh
2024-05-02 11:52:31 +00:00
parent 2ae4531c89
commit 78bc1339ac
3 changed files with 8 additions and 11 deletions

View File

@ -1703,7 +1703,7 @@ void sqlite3Pragma(
/* Set the maximum error count */
mxErr = SQLITE_INTEGRITY_CHECK_ERROR_MAX;
if( zRight ){
if( sqlite3GetInt32(zRight, &mxErr) ){
if( sqlite3GetInt32(pValue->z, &mxErr) ){
if( mxErr<=0 ){
mxErr = SQLITE_INTEGRITY_CHECK_ERROR_MAX;
}