1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

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
This commit is contained in:
drh
2016-11-14 17:25:57 +00:00
parent 2adb878b1f
commit 55377b4717
6 changed files with 87 additions and 16 deletions

View File

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