--handle-unknown option takes a required argument
Fix a segmentation fault if the --handle-unknown option was set without
arguments.
Thanks to Alexandre Rebert and his team at Carnegie Mellon University
for detecting this crash.
diff --git a/checkpolicy/checkpolicy.c b/checkpolicy/checkpolicy.c
index 544f235..292f568 100644
--- a/checkpolicy/checkpolicy.c
+++ b/checkpolicy/checkpolicy.c
@@ -402,7 +402,7 @@
{"binary", no_argument, NULL, 'b'},
{"debug", no_argument, NULL, 'd'},
{"version", no_argument, NULL, 'V'},
- {"handle-unknown", optional_argument, NULL, 'U'},
+ {"handle-unknown", required_argument, NULL, 'U'},
{"mls", no_argument, NULL, 'M'},
{"help", no_argument, NULL, 'h'},
{NULL, 0, NULL, 0}