From: Lars Op den Kamp Date: Thu, 25 Oct 2012 11:58:12 +0000 (+0200) Subject: respond with CEC_ABORT_REASON_INVALID_OPERAND when receiving a keypress without a... X-Git-Tag: upstream/2.2.0~1^2~13^2~9 X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=commitdiff_plain;h=8add8f3863be94878003c3853342281611f4c4c8 respond with CEC_ABORT_REASON_INVALID_OPERAND when receiving a keypress without a parameter --- 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; }