From a3b2da9889ceb5ca041ca0eb2bc8d35190aae94c Mon Sep 17 00:00:00 2001 From: drh Date: Fri, 17 Mar 2017 03:21:14 +0000 Subject: Fix a problem in the enhanced PRAGMA integrity_check where it verifies CHECK constraints: Do not be confused by the reuse of the Table.pCheck field by VIEWs with named columns. Problem discovered by OSS-Fuzz. FossilOrigin-Name: 019dd3d5ba4a596c4ec3b5f0de8402c72196af0faca9138edbc0f1f4957cae60 --- src/pragma.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/pragma.c b/src/pragma.c index 488a1d194..6c27fdc5c 100644 --- a/src/pragma.c +++ b/src/pragma.c @@ -1505,6 +1505,7 @@ void sqlite3Pragma( int iDataCur, iIdxCur; int r1 = -1; + if( pTab->tnum<1 ) continue; /* Skip VIEWs or VIRTUAL TABLEs */ if( pTab->pCheck==0 && (pTab->tabFlags & TF_HasNotNull)==0 && (pTab->pIndex==0 || isQuick) -- cgit v1.2.3