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
diff --git a/tool/fuzzershell.c b/tool/fuzzershell.c
index d19139d..710e070 100644
--- a/tool/fuzzershell.c
+++ b/tool/fuzzershell.c
@@ -195,12 +195,14 @@
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);