mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
More aggressive detection of OOM errors in resolveAlias().
dbsqlfuzz 7f96832c2ef7ee472022ed805b064e55e41094b2 FossilOrigin-Name: e99faf4f82746761c389e24db1b00ee94b9f849e7bcb29517fa0ca10290afc41
This commit is contained in:
@@ -1324,6 +1324,7 @@ static Expr *exprDup(sqlite3 *db, Expr *p, int dupFlags, u8 **pzBuffer){
|
||||
if( pzBuffer ){
|
||||
zAlloc = *pzBuffer;
|
||||
staticFlag = EP_Static;
|
||||
assert( zAlloc!=0 );
|
||||
}else{
|
||||
zAlloc = sqlite3DbMallocRawNN(db, dupedExprSize(p, dupFlags));
|
||||
staticFlag = 0;
|
||||
@@ -2356,8 +2357,10 @@ int sqlite3ExprIsInteger(Expr *p, int *pValue){
|
||||
*/
|
||||
int sqlite3ExprCanBeNull(const Expr *p){
|
||||
u8 op;
|
||||
assert( p!=0 );
|
||||
while( p->op==TK_UPLUS || p->op==TK_UMINUS ){
|
||||
p = p->pLeft;
|
||||
assert( p!=0 );
|
||||
}
|
||||
op = p->op;
|
||||
if( op==TK_REGISTER ) op = p->op2;
|
||||
|
||||
Reference in New Issue
Block a user