diff options
author | drh <> | 2021-02-05 17:34:47 +0000 |
---|---|---|
committer | drh <> | 2021-02-05 17:34:47 +0000 |
commit | 29f6a365ccd09fdf922125f324d13d2cac34d3e4 (patch) | |
tree | 83811b294aa34b40b3f2ff8e0bc92fb50af0de3b /src/auth.c | |
parent | 70bd2124ed8dba89ee3ad2ccb25c5686b1d0ead5 (diff) | |
download | sqlite-29f6a365ccd09fdf922125f324d13d2cac34d3e4.tar.gz sqlite-29f6a365ccd09fdf922125f324d13d2cac34d3e4.zip |
Remove unreachable code. Fix a shift UB problem introduced yesterday
and discovered by OSSFuzz.
FossilOrigin-Name: 078dbff04a95a001bbd8690ab08038fbb5506899df8290991b53fd1122a4c30c
Diffstat (limited to 'src/auth.c')
-rw-r--r-- | src/auth.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/auth.c b/src/auth.c index 83451c29a..48b1c42be 100644 --- a/src/auth.c +++ b/src/auth.c @@ -143,7 +143,6 @@ void sqlite3AuthRead( Schema *pSchema, /* The schema of the expression */ SrcList *pTabList /* All table that pExpr might refer to */ ){ - sqlite3 *db = pParse->db; Table *pTab = 0; /* The table being read */ const char *zCol; /* Name of the column of the table */ int iSrc; /* Index in pTabList->a[] of table being read */ @@ -151,8 +150,8 @@ void sqlite3AuthRead( int iCol; /* Index of column in table */ assert( pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER ); - assert( !IN_RENAME_OBJECT || db->xAuth==0 ); - if( db->xAuth==0 ) return; + assert( !IN_RENAME_OBJECT ); + assert( pParse->db->xAuth!=0 ); iDb = sqlite3SchemaToIndex(pParse->db, pSchema); if( iDb<0 ){ /* An attempt to read a column out of a subquery or other @@ -183,7 +182,7 @@ void sqlite3AuthRead( }else{ zCol = "ROWID"; } - assert( iDb>=0 && iDb<db->nDb ); + assert( iDb>=0 && iDb<pParse->db->nDb ); if( SQLITE_IGNORE==sqlite3AuthReadCol(pParse, pTab->zName, zCol, iDb) ){ pExpr->op = TK_NULL; } |