mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Enhance dbfuzz2 so that with the -v option it shows the return code and
error message for any failing SQL statements. FossilOrigin-Name: 3a127ef9f7feafe6ba8c75e4eb29e28aa61a30249082cc8767ada1ec0cc0b7f1
This commit is contained in:
@ -82,6 +82,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *aData, size_t nByte){
|
||||
int rc;
|
||||
int i;
|
||||
sqlite3_int64 x;
|
||||
char *zErr = 0;
|
||||
|
||||
if( eVerbosity>=1 ){
|
||||
printf("************** nByte=%d ***************\n", (int)nByte);
|
||||
@ -106,7 +107,12 @@ int LLVMFuzzerTestOneInput(const uint8_t *aData, size_t nByte){
|
||||
printf("%s\n", azSql[i]);
|
||||
fflush(stdout);
|
||||
}
|
||||
sqlite3_exec(db, azSql[i], 0, 0, 0);
|
||||
zErr = 0;
|
||||
rc = sqlite3_exec(db, azSql[i], 0, 0, &zErr);
|
||||
if( rc && eVerbosity>=1 ){
|
||||
printf("-- rc=%d zErr=%s\n", rc, zErr);
|
||||
}
|
||||
sqlite3_free(zErr);
|
||||
}
|
||||
rc = sqlite3_close(db);
|
||||
if( rc!=SQLITE_OK ){
|
||||
|
Reference in New Issue
Block a user