Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b96bccf9 authored by Jinsuk Kim's avatar Jinsuk Kim
Browse files

CEC: Validate <Vendor Command> correctly

The command always has one or more bytes for its parameter, so
the right validation should have been the one ensuring the number
of bytes (1 ~ 14).

Bug: 24986703
Change-Id: I171e971f1649761d69ffe2aa0af364f34dc9ac3e
(cherry picked from commit 4808581f4dfdf04adcd2646e152dede0ce418cad)
parent cb802870
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ public final class HdmiCecMessageValidator {
        // Allow unregistered source for all vendor specific commands, because we don't know
        // how to use the commands at this moment.
        addValidationInfo(Constants.MESSAGE_VENDOR_COMMAND,
                maxLengthValidator, DEST_DIRECT | SRC_UNREGISTERED);
                new VariableLengthValidator(1, 14), DEST_DIRECT | SRC_UNREGISTERED);
        addValidationInfo(Constants.MESSAGE_VENDOR_COMMAND_WITH_ID,
                new VariableLengthValidator(4, 14), DEST_ALL | SRC_UNREGISTERED);
        addValidationInfo(Constants.MESSAGE_VENDOR_REMOTE_BUTTON_DOWN,