tests: add fuzz setup.
This commit is contained in:
parent
1c2e318f22
commit
9f3845e97c
|
@ -0,0 +1,15 @@
|
||||||
|
#include "qSqlparser.h"
|
||||||
|
|
||||||
|
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size){
|
||||||
|
char *new_str = (char *)malloc(size+1);
|
||||||
|
if (new_str == NULL){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
memcpy(new_str, data, size);
|
||||||
|
new_str[size] = '\0';
|
||||||
|
|
||||||
|
qSqlParse(new_str);
|
||||||
|
|
||||||
|
free(new_str);
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue