This commit is contained in:
Maciej Domanski
2022-12-27 16:54:36 +01:00
parent 3d031f93a6
commit b189640a92
5 changed files with 45 additions and 27 deletions

View File

@ -3,6 +3,7 @@
#include "argv-fuzz-inl.h"
int main(int argc, char **argv) {
// Initialize the argv array for use with the AFL (American Fuzzy Lop) tool
AFL_INIT_ARGV();
@ -12,12 +13,16 @@ int main(int argc, char **argv) {
an error message is printed. If the values do match, the program
calls the abort() function. */
if (argc > 1 && strcmp(argv[1], "XYZ") == 0) {
if (strcmp(argv[2], "TEST2") == 0) {
abort();
}
if (strcmp(argv[2], "TEST2") == 0) { abort(); }
} else {
printf("Bad number of arguments!\n");
}
return 0;
}
}