shithub: fuzz

Download patch

ref: 88f50d12ce3f1a036fa36cd23a951b781f553919
parent: 2bcf2670c83da3c4da7a7002a198ac0c18c1ee39
author: seh <seh@localhost>
date: Sun Nov 25 16:09:04 EST 2018

fix NCALLS off by one ;; don't allow calling with no calls specified

--- a/fuzz.h
+++ b/fuzz.h
@@ -11,7 +11,7 @@
 #define MAXINT 2147483647
 
 // Number of calls in enum calls
-#define NCALLS 68
+#define NCALLS 67
 #define NTYPES 16
 
 // Global variables
--- a/main.c
+++ b/main.c
@@ -77,6 +77,10 @@
 
 	// Initialize the table of all system calls
 	initsctable();
+	
+	// If no system calls are specified, throw usage()
+	if(argc == 0)
+		usage();
 
 	// If the call name '?' is specified as the first argument, print all call names
 	if(strcmp(*argv, "?") == 0){