aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/expr.c2
-rw-r--r--src/shell.c.in4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/expr.c b/src/expr.c
index 8c118d077..ca5b9092e 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -3285,7 +3285,7 @@ int sqlite3FindInIndex(
if( aiMap ) aiMap[i] = j;
}
- assert( nExpr<BMS );
+ assert( nExpr>0 && nExpr<BMS );
assert( i==nExpr || colUsed!=(MASKBIT(nExpr)-1) );
if( colUsed==(MASKBIT(nExpr)-1) ){
/* If we reach this point, that means the index pIdx is usable */
diff --git a/src/shell.c.in b/src/shell.c.in
index 4da92072d..db0604eb1 100644
--- a/src/shell.c.in
+++ b/src/shell.c.in
@@ -10122,6 +10122,7 @@ static int do_meta_command(char *zLine, ShellState *p){
#else
FILE *pfPipe = sqlite3_popen(zFile + 1, "w");
if( pfPipe==0 ){
+ assert( stderr!=NULL );
sqlite3_fprintf(stderr,"Error: cannot open pipe \"%s\"\n", zFile + 1);
rc = 1;
}else{
@@ -10134,7 +10135,8 @@ static int do_meta_command(char *zLine, ShellState *p){
FILE *pfFile = output_file_open(zFile);
if( pfFile==0 ){
if( cli_strcmp(zFile,"off")!=0 ){
- sqlite3_fprintf(stderr,"Error: cannot write to \"%s\"\n", zFile);
+ assert( stderr!=NULL );
+ sqlite3_fprintf(stderr,"Error: cannot write to \"%s\"\n", zFile);
}
rc = 1;
} else {