From 7104eed8fe5499fbe2d1d21204658a86a998fcb7 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 12 Feb 2014 16:04:33 -0500 Subject: [PATCH] prevent crash in jack_property when used with no arguments --- property.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/property.c b/property.c index b243750..2b9a6b9 100644 --- a/property.c +++ b/property.c @@ -104,6 +104,11 @@ int main (int argc, char* argv[]) { 0, 0, 0, 0 } }; + if (argc < 2) { + show_usage (); + exit (1); + } + while ((c = getopt_long (argc, argv, "sdDlaApc", long_options, &option_index)) >= 0) { switch (c) { case 's':