Fix a potential crash that may follow an OOM or other system error in the shell tool.

FossilOrigin-Name: c36761e1a05c15c48468dd793faf06636f5dcfd3b4314074c4d9c9eac5c2695c
This commit is contained in:
dan 2017-10-12 11:33:13 +00:00
parent e1b972bd38
commit 122ab8fd9d
3 changed files with 8 additions and 7 deletions

View File

@ -1,5 +1,5 @@
C Update\ssome\stest\scases\sto\swork\swith\sSQLITE_OMIT_VIRTUALTABLE\sand\nDEFAULT_AUTOVACUUM\sbuilds.
D 2017-10-12T11:13:34.180
C Fix\sa\spotential\scrash\sthat\smay\sfollow\san\sOOM\sor\sother\ssystem\serror\sin\sthe\sshell\stool.
D 2017-10-12T11:33:13.900
F Makefile.in 4bc36d913c2e3e2d326d588d72f618ac9788b2fd4b7efda61102611a6495c3ff
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc 6033b51b6aea702ea059f6ab2d47b1d3cef648695f787247dd4fb395fe60673f
@ -459,7 +459,7 @@ F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
F src/resolve.c 4324a94573b1e29286f8121e4881db59eaedc014afeb274c8d3e07ed282e0e20
F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac
F src/select.c 42aca61e739c405ddd8a1b702977a7743c7d52a94885f7c5596bd7e73e6bff18
F src/shell.c cbf450e75665a185c546adc702ec5fd091306ae7a08bc88b1508ac9c11acc7fe
F src/shell.c edadbfd5b21ec8fadf8844f087b2c1224cb9db57614b4a69c33e732436296f43
F src/shell.c.in e03f7d473e10b65c25836a058a3e7a1665ffb1fe712949dcd6e38c790e4eafd0
F src/sqlite.h.in ab4f8a29d1580dfaeb6891fa1b83cff8229ba0daa56994707ceaca71495d9ab7
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
@ -1657,7 +1657,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 5c4980ef17291dcea5e93ead353b9a95e2fbff56ff7257e9878d095f6827b4e9
R b29f3e00752cf4173db0ec3aec606d66
P 4b68f424ca9b5d4b0e77065a4e60ec0f70dcce0d01053fd7a6b2ecae9d3a5967
R 83b72d43ce085ee1e083f5ceb39f739a
U dan
Z bf0ac220dc2474d5d13a0301e1eb0593
Z e19953ef492c0be13869a8f2e3e20ba9

View File

@ -1 +1 @@
4b68f424ca9b5d4b0e77065a4e60ec0f70dcce0d01053fd7a6b2ecae9d3a5967
c36761e1a05c15c48468dd793faf06636f5dcfd3b4314074c4d9c9eac5c2695c

View File

@ -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;