mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-01 13:10:43 +00:00
move Makefile to test/
This commit is contained in:
1 parent
601af780c9
commit
89aaf1c30c
14 files changed
+792
-139
No files matched your search
+4
-5
@@ -123,13 +123,12 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
int main(int argc, char *argv[]) {
|
||||
int res = EXIT_FAILURE;
|
||||
if (argc > 1) {
|
||||
size_t len = 0;
|
||||
char *buf = mg_file_read(&mg_fs_posix, argv[1], &len);
|
||||
if (buf != NULL) {
|
||||
LLVMFuzzerTestOneInput((uint8_t *) buf, len);
|
||||
struct mg_str data = mg_file_read(&mg_fs_posix, argv[1]);
|
||||
if (data.buf != NULL) {
|
||||
LLVMFuzzerTestOneInput((uint8_t *) data.buf, data.len);
|
||||
res = EXIT_SUCCESS;
|
||||
}
|
||||
free(buf);
|
||||
free(data.buf);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user