respond with CEC_ABORT_REASON_INVALID_OPERAND when receiving a keypress without a...
authorLars Op den Kamp <lars@opdenkamp.eu>
Thu, 25 Oct 2012 11:58:12 +0000 (13:58 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Thu, 25 Oct 2012 11:58:12 +0000 (13:58 +0200)
src/lib/implementations/CECCommandHandler.cpp

index 863b6175de5d757980cf8dfa59e56701fb699e48..c5a58367e45f5f3b645fb7f3879d7b35f172cd61 100644 (file)
@@ -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;
 }