From 8add8f3863be94878003c3853342281611f4c4c8 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Thu, 25 Oct 2012 13:58:12 +0200 Subject: [PATCH] respond with CEC_ABORT_REASON_INVALID_OPERAND when receiving a keypress without a parameter --- src/lib/implementations/CECCommandHandler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index 863b617..c5a5836 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -720,6 +720,9 @@ int CCECCommandHandler::HandleVendorCommand(const cec_command & UNUSED(command)) int CCECCommandHandler::HandleVendorRemoteButtonDown(const cec_command& command) { + if (command.parameters.size == 0) + return CEC_ABORT_REASON_INVALID_OPERAND; + LIB_CEC->AddLog(CEC_LOG_NOTICE, "unhandled vendor remote button received with keycode %x", command.parameters[0]); return COMMAND_HANDLED; } -- 2.34.1