path: root/utils/rds-ctl/rds-ctl.cpp
diff options
authorHans Verkuil <hans.verkuil@cisco.com>2012-12-06 12:07:17 +0100
committerHans Verkuil <hans.verkuil@cisco.com>2012-12-06 12:07:17 +0100
commit706196bdfa43d30bcca35f2a6729c1672c7eb4b4 (patch)
tree4d757860ab8108170edc10b6b65641f8bffc39b8 /utils/rds-ctl/rds-ctl.cpp
parentdb8495bf9f5e1ac97dcb79afdd300da142c1372d (diff)
v4l-utils/utils: fix bug in parse_subopt()
The parse_subopt function did a wrong NULL check, which could cause an application crash if the sub-option wasn't specified. This function is used in rds-ctl, v4l2-ctl and v4l2-dbg and is now fixed in all three. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Diffstat (limited to 'utils/rds-ctl/rds-ctl.cpp')
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/rds-ctl/rds-ctl.cpp b/utils/rds-ctl/rds-ctl.cpp
index ebd30eab..de76d9f3 100644
--- a/utils/rds-ctl/rds-ctl.cpp
+++ b/utils/rds-ctl/rds-ctl.cpp
@@ -411,7 +411,7 @@ static int parse_subopt(char **subs, const char * const *subopts, char **value)
fprintf(stderr, "Invalid suboptions specified\n");
return -1;
- if (value == NULL) {
+ if (*value == NULL) {
fprintf(stderr, "No value given to suboption <%s>\n",
return -1;

Privacy Policy