aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2017-08-22 13:23:00 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2017-08-22 13:23:00 +0200
commit6ce40e200f3ff089d67445098f42816a17922a40 (patch)
tree260b71914e631f2f4e3ae3d3d67bd7665733b4f5
parent15df21b333e243827ac0f89d7f4f307bf0968baf (diff)
cec-ctl: fix crash when store_pin is NULL
The patch adding support for stdout as the destination for the pin data broke cec-ctl: if store_pin is NULL (i.e. almost always), then it called strcmp with a NULL pointer. Fix this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r--utils/cec-ctl/cec-ctl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/cec-ctl/cec-ctl.cpp b/utils/cec-ctl/cec-ctl.cpp
index 66a68648..2a43ea6e 100644
--- a/utils/cec-ctl/cec-ctl.cpp
+++ b/utils/cec-ctl/cec-ctl.cpp
@@ -1990,7 +1990,7 @@ int main(int argc, char **argv)
return 0;
}
- if (!strcmp(store_pin, "-"))
+ if (store_pin && !strcmp(store_pin, "-"))
options[OptSkipInfo] = 1;
if (rc_tv && rc_src) {

Privacy Policy