aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/parse.y2
-rw-r--r--src/util.c2
-rw-r--r--src/vdbeaux.c3
3 files changed, 5 insertions, 2 deletions
diff --git a/src/parse.y b/src/parse.y
index 73508b046..42876feeb 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -1378,7 +1378,7 @@ case_else(A) ::= ELSE expr(X). {A = X;}
case_else(A) ::= . {A = 0;}
%type case_operand {Expr*}
%destructor case_operand {sqlite3ExprDelete(pParse->db, $$);}
-case_operand(A) ::= expr(X). {A = X; /*A-overwrites-X*/}
+case_operand(A) ::= expr(A).
case_operand(A) ::= . {A = 0;}
%type exprlist {ExprList*}
diff --git a/src/util.c b/src/util.c
index 8e3c6c9db..72e8a18b2 100644
--- a/src/util.c
+++ b/src/util.c
@@ -879,7 +879,7 @@ int sqlite3GetInt32(const char *zNum, int *pValue){
u32 u = 0;
zNum += 2;
while( zNum[0]=='0' ) zNum++;
- for(i=0; sqlite3Isxdigit(zNum[i]) && i<8; i++){
+ for(i=0; i<8 && sqlite3Isxdigit(zNum[i]); i++){
u = u*16 + sqlite3HexToInt(zNum[i]);
}
if( (u&0x80000000)==0 && sqlite3Isxdigit(zNum[i])==0 ){
diff --git a/src/vdbeaux.c b/src/vdbeaux.c
index 1848cdea3..07145bb05 100644
--- a/src/vdbeaux.c
+++ b/src/vdbeaux.c
@@ -820,6 +820,8 @@ static void resolveP2Values(Vdbe *p, int *pMaxFuncArgs){
Op *pOp;
Parse *pParse = p->pParse;
int *aLabel = pParse->aLabel;
+
+ assert( pParse->db->mallocFailed==0 ); /* tag-20230419-1 */
p->readOnly = 1;
p->bIsReader = 0;
pOp = &p->aOp[p->nOp-1];
@@ -879,6 +881,7 @@ static void resolveP2Values(Vdbe *p, int *pMaxFuncArgs){
** have non-negative values for P2. */
assert( (sqlite3OpcodeProperty[pOp->opcode] & OPFLG_JUMP)!=0 );
assert( ADDR(pOp->p2)<-pParse->nLabel );
+ assert( aLabel!=0 ); /* True because of tag-20230419-1 */
pOp->p2 = aLabel[ADDR(pOp->p2)];
}
break;