aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordan <dan@noemail.net>2017-10-12 11:33:13 +0000
committerdan <dan@noemail.net>2017-10-12 11:33:13 +0000
commit122ab8fd9ddc54be1243033ce1b7462b1597927d (patch)
treedc6af97e3803e2447bb1932dbe5a47c0f476cd63 /src
parente1b972bd38071d3b78bf34a08e27db490e5fd6d6 (diff)
downloadsqlite-122ab8fd9ddc54be1243033ce1b7462b1597927d.tar.gz
sqlite-122ab8fd9ddc54be1243033ce1b7462b1597927d.zip
Fix a potential crash that may follow an OOM or other system error in the shell tool.
FossilOrigin-Name: c36761e1a05c15c48468dd793faf06636f5dcfd3b4314074c4d9c9eac5c2695c
Diffstat (limited to 'src')
-rw-r--r--src/shell.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shell.c b/src/shell.c
index f7be94157..06ffb32b8 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -3801,6 +3801,7 @@ static char **tableColumnList(ShellState *p, const char *zTab){
}
}
sqlite3_finalize(pStmt);
+ if( !azCol ) return 0;
azCol[0] = 0;
azCol[nCol+1] = 0;