aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-compliance
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2018-12-06 09:11:26 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2018-12-06 09:11:26 +0100
commit08fa0b6b30018ea4c9de4eda80b7ccdc16a69a5c (patch)
treea6009c215a5ce023ad530a83becf5c352b789737 /utils/cec-compliance
parent9f0354c3320f3cc62983f726bfed66e1d0c21f83 (diff)
cec-compliance: check if SET_OSD_NAME gives valid OSD name
Check for empty OSD name or if there are trailing 0 bytes transmitted after the string. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'utils/cec-compliance')
-rw-r--r--utils/cec-compliance/cec-test.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/cec-compliance/cec-test.cpp b/utils/cec-compliance/cec-test.cpp
index 414a23f0..07a2f22c 100644
--- a/utils/cec-compliance/cec-test.cpp
+++ b/utils/cec-compliance/cec-test.cpp
@@ -311,7 +311,9 @@ int device_osd_transfer_give(struct node *node, unsigned me, unsigned la, bool i
return PRESUMED_OK;
char osd_name[15];
cec_ops_set_osd_name(&msg, osd_name);
+ fail_on_test(!osd_name[0]);
fail_on_test(strcmp(node->remote[la].osd_name, osd_name));
+ fail_on_test(msg.len != strlen(osd_name) + 2);
return 0;
}

Privacy Policy