ref: 6e82d2a07bdeba1e2b743bb991a943c12c2d5878
parent: 5f232419b46551ccceef38f10a0613f09b3a68ef
author: seh <seh@localhost>
date: Sat Nov 24 13:57:11 EST 2018
add error prints if found
--- a/input.c
+++ b/input.c
@@ -187,10 +187,12 @@
break;
case sc_exec : // exec(char* : char*[]);
//TODO - mut_char_star_arr not implemented
+ fprint(2, "Error: Syscall not implemented!\n");
exits("SYSCALL NOT IMPLEMENTED");
break;
case sc_execl : // execl(char* : ...);
//TODO - not sure what to do with variable # of parameters
+ fprint(2, "Error: Syscall not implemented!\n");
exits("SYSCALL NOT IMPLEMENTED");
break;
case sc_fork : // fork(void);
@@ -344,6 +346,7 @@
break;
case sc_notify : // notify(void(*)(void* : char*));
//TODO - this sc takes a function pointer, we don't have infrastructure for that
+ fprint(2, "Error: Syscall not implemented!\n");
exits("SYSCALL NOT IMPLEMENTED");
break;
case sc_open : // open(char* : int);
@@ -999,9 +1002,11 @@
break;
case sc_werrstr : // werrstr(char* : ...);
//TODO - not sure what to do with variable # of parameters
+ fprint(2, "Error: Syscall not implemented!\n");
exits("SYSCALL NOT IMPLEMENTED");
break;
default:
+ fprint(2, "Error: Unknown system call encountered!\n");
exits("Unknown system call");
}
}
@@ -1056,6 +1061,7 @@
dolog("t_uchar: %c\n", *(unsigned char*) ele->var);
break;
default :
+ fprint(2, "Error: Encountered unknown input variable type!\n");
exits("Unknown input variable type!");
}
dolog("\n");
--- a/main.c
+++ b/main.c
@@ -60,7 +60,7 @@
dolog("Loading call: %s\n", *argv);
ladd(&tofuzz, &syscalls[index]); // Might be dangerous, pls fix
}else{
- print("Error: Invalid system call: %s\n", *argv);
+ fprint(2, "Error: Invalid system call: %s\n", *argv);
exits("Encountered invalid syscall");
}
}
@@ -84,6 +84,8 @@
caller *fcall = (caller*) lget(&tofuzz, j);
dolog(" Fuzzing: %s \n", fcall->name);
+ fuzz(fcall); // Fuzz, syncs the disk
+ /*
// Someone in here is calling exits inappropriately so forking.
int pid = rfork(RFFDG|RFREND|RFPROC|RFMEM);
if(pid == 0){
@@ -91,7 +93,8 @@
fuzz(fcall); // Fuzz, syncs the disk
exits(nil);
}
- }
+ */
+ }
}
close(logfd);