shithub: fuzz

Download patch

ref: 3ef96a1b458c0f8125b28f8ef760c8053fcc89a0
parent: 88f50d12ce3f1a036fa36cd23a951b781f553919
author: seh <seh@localhost>
date: Sun Nov 25 16:20:00 EST 2018

fix -n argument not being strict about input type or existence

--- a/main.c
+++ b/main.c
@@ -65,11 +65,15 @@
 {
 	int nrounds = -1, i;
 	List tofuzz = mklist() ; // List of syscall table ID's to fuzz
+	char* arg;
 
 	ARGBEGIN{
 		case 'n':
 			// Number of rounds to iterate fuzzing for
-			nrounds = atoi(ARGF());
+			arg = ARGF();
+			if(arg == nil)
+				usage();
+			nrounds = atoi(arg);
 			break;
 		default:
 			usage();