aboutsummaryrefslogtreecommitdiff
path: root/ext/misc/unionvtab.c
diff options
context:
space:
mode:
authordan <dan@noemail.net>2017-08-05 16:15:33 +0000
committerdan <dan@noemail.net>2017-08-05 16:15:33 +0000
commit226744d11b0c9eab05b4bf1b67fd8916623c6abd (patch)
tree675d205e1bfdddd20510e7d7b44a977b2d68bd77 /ext/misc/unionvtab.c
parenteabb67fb6175d83f54b8039b49bee4f25782e4c6 (diff)
downloadsqlite-226744d11b0c9eab05b4bf1b67fd8916623c6abd.tar.gz
sqlite-226744d11b0c9eab05b4bf1b67fd8916623c6abd.zip
Fix a segfault in swarmvtab that could occur if there was an error in the SQL
statement passed to the constructor. Add other test cases. FossilOrigin-Name: 6ce8b7ca62fcf97875395fc1a989179309e0abb48d4465658ef0d871434ea057
Diffstat (limited to 'ext/misc/unionvtab.c')
-rw-r--r--ext/misc/unionvtab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/misc/unionvtab.c b/ext/misc/unionvtab.c
index 8b7f4c2ee..fc87915b3 100644
--- a/ext/misc/unionvtab.c
+++ b/ext/misc/unionvtab.c
@@ -721,7 +721,7 @@ static int unionConnect(
pStmt = 0;
/* Capture the not-found callback UDF name */
- if( argc>=5 ){
+ if( rc==SQLITE_OK && argc>=5 ){
pTab->zNotFoundCallback = unionStrdup(&rc, argv[4]);
unionDequote(pTab->zNotFoundCallback);
}