diff options
author | drh <drh@noemail.net> | 2016-11-14 17:25:57 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2016-11-14 17:25:57 +0000 |
commit | 55377b47174f456fc6bb93e1096435a0071d4ea1 (patch) | |
tree | d80399b0c9c81f3e657469c91e3b9f3c1563817f /test/ossfuzz.c | |
parent | 2adb878b1fb7d02c4c247889dbd98c8bfbb96c49 (diff) | |
download | sqlite-55377b47174f456fc6bb93e1096435a0071d4ea1.tar.gz sqlite-55377b47174f456fc6bb93e1096435a0071d4ea1.zip |
Fix the ossfuzz.c test module so that it does not segfault after a
"PRAGMA empty_result_callbacks=1;". Add the ossshell.c program for
simple command-line testing of ossfuzz.c.
FossilOrigin-Name: 6f2d43eca68175ed28abae3afa792095af906af2
Diffstat (limited to 'test/ossfuzz.c')
-rw-r--r-- | test/ossfuzz.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ossfuzz.c b/test/ossfuzz.c index ae07bebc3..4bf0eb5e4 100644 --- a/test/ossfuzz.c +++ b/test/ossfuzz.c @@ -18,7 +18,9 @@ static int progress_handler(void *pReturn) { */ static int exec_handler(void *pCnt, int argc, char **argv, char **namev){ int i; - for(i=0; i<argc; i++) sqlite3_free(sqlite3_mprintf("%s", argv[i])); + if( argv ){ + for(i=0; i<argc; i++) sqlite3_free(sqlite3_mprintf("%s", argv[i])); + } return ((*(int*)pCnt)--)<=0; } |