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 /tool/fuzzershell.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 'tool/fuzzershell.c')
-rw-r--r-- | tool/fuzzershell.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tool/fuzzershell.c b/tool/fuzzershell.c index d19139d98..710e07024 100644 --- a/tool/fuzzershell.c +++ b/tool/fuzzershell.c @@ -195,12 +195,14 @@ static int execCallback(void *NotUsed, int argc, char **argv, char **colv){ int i; static unsigned cnt = 0; printf("ROW #%u:\n", ++cnt); - for(i=0; i<argc; i++){ - printf(" %s=", colv[i]); - if( argv[i] ){ - printf("[%s]\n", argv[i]); - }else{ - printf("NULL\n"); + if( argv ){ + for(i=0; i<argc; i++){ + printf(" %s=", colv[i]); + if( argv[i] ){ + printf("[%s]\n", argv[i]); + }else{ + printf("NULL\n"); + } } } fflush(stdout); |