Fix a segfault that could follow an OOM when querying a table that has one or more columns with default values "true" or "false".
FossilOrigin-Name: 202f9919c222ee933924c63c15ad36ec4481457b1e4d9179af14c9f284117c0c
This commit is contained in:
+5
-3
@@ -1530,9 +1530,11 @@ static int valueFromExpr(
|
||||
}
|
||||
#endif
|
||||
else if( op==TK_TRUEFALSE ){
|
||||
pVal = valueNew(db, pCtx);
|
||||
pVal->flags = MEM_Int;
|
||||
pVal->u.i = pExpr->u.zToken[4]==0;
|
||||
pVal = valueNew(db, pCtx);
|
||||
if( pVal ){
|
||||
pVal->flags = MEM_Int;
|
||||
pVal->u.i = pExpr->u.zToken[4]==0;
|
||||
}
|
||||
}
|
||||
|
||||
*ppVal = pVal;
|
||||
|
||||
Reference in New Issue
Block a user