Skip to contentSkip to conversation

media-ctl: Fix bad long option crash

PATCH In review Sakari Ailus 2 participants 2 messages Nov 17, 2015 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media-ctl: Fix bad long option crash

The long options array has to be followed by an all-zero entry. There was none.

---
 utils/media-ctl/options.c | 1 +
 1 file changed, 1 insertion(+)
utils/media-ctl/options.c +1 -0
index ffaffcd..2751e6e 100644
@@ -97,6 +97,7 @@ static struct option opts[] = {
 	{"print-topology", 0, 0, 'p'},
 	{"reset", 0, 0, 'r'},
 	{"verbose", 0, 0, 'v'},
+	{ },
 };
 
 int parse_cmdline(int argc, char **argv)
Signature · 1 line
2.1.0.231.g7484e3b
Acked-by on v1 1/1
#1 lore raw

Hi Sakari,

Thank you for the patch.

Quoted 4 lines · On Tuesday 17 November 2015 13:40:58 Sakari Ailus wrote:

The long options array has to be followed by an all-zero entry. There was none.

Quoted 16 lines
---
 utils/media-ctl/options.c | 1 +
 1 file changed, 1 insertion(+)
utils/media-ctl/options.c +1 -0
index ffaffcd..2751e6e 100644
@@ -97,6 +97,7 @@ static struct option opts[] = {
 	{"print-topology", 0, 0, 'p'},
 	{"reset", 0, 0, 'r'},
 	{"verbose", 0, 0, 'v'},
+	{ },
 };
 
 int parse_cmdline(int argc, char **argv)
Signature · 7 lines
Regards,

Laurent Pinchart
-- 
Regards,

Laurent Pinchart