From 1cfee74a2812b8f09e8b8ecf419a69b19de16b79 Mon Sep 17 00:00:00 2001 From: drh Date: Wed, 19 Feb 2020 15:39:46 +0000 Subject: Fix a potential NULL pointer dereference following OOM. Problem discovered by dbsqlfuzz. Test case in TH3. FossilOrigin-Name: 5aeb5a2d295e10d5fc1d456b3acaf8ac13c04cb5bb71a8c4571541d366e95887 --- src/resolve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/resolve.c') diff --git a/src/resolve.c b/src/resolve.c index 119a07fd2..05ef0c06e 100644 --- a/src/resolve.c +++ b/src/resolve.c @@ -1051,7 +1051,7 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){ assert( !ExprHasProperty(pExpr, EP_Reduced) ); /* Handle special cases of "x IS TRUE", "x IS FALSE", "x IS NOT TRUE", ** and "x IS NOT FALSE". */ - if( pRight->op==TK_ID ){ + if( pRight && pRight->op==TK_ID ){ int rc = resolveExprStep(pWalker, pRight); if( rc==WRC_Abort ) return WRC_Abort; if( pRight->op==TK_TRUEFALSE ){ -- cgit v1.2.3