1 POSIX says that behavior when subopts list is empty is undefined.
2 musl libs will set value to NULL which leads to crash.
4 Simply avoid getsubopt, since we cannot rely on it.
6 diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp
7 index 3ea6cd3..291fb3e 100644
8 --- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
9 +++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
10 @@ -692,16 +692,17 @@ static bool parse_subset(char *optarg)
12 static bool parse_next_subopt(char **subs, char **value)
14 - static char *const subopts[] = {
17 - int opt = getsubopt(subs, subopts, value);
21 - if (opt < 0 || *value)
23 - fprintf(stderr, "No value given to suboption <%s>\n",
26 + while (*p && *p != ',')
36 void common_cmd(int ch, char *optarg)