[hackers] [sbase][PATCH] uname: check that no operands are specified

From: Mattias Andrée <maandree_AT_kth.se>
Date: Wed, 11 Jul 2018 20:53:17 +0200

Signed-off-by: Mattias Andrée <maandree_AT_kth.se>
---
 uname.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/uname.c b/uname.c
index dfc979e..122c172 100644
--- a/uname.c
+++ b/uname.c
_AT_@ -40,6 +40,9 @@ main(int argc, char *argv[])
 		usage();
 	} ARGEND
 
+	if (argc)
+		usage();
+
 	if (uname(&u) < 0)
 		eprintf("uname:");
 
-- 
2.11.1
Received on Wed Jul 11 2018 - 20:53:17 CEST

This archive was generated by hypermail 2.3.0 : Wed Jul 11 2018 - 21:00:27 CEST