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

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

CEC: Do null/empty check against the parameter for checkRecordSource()

This prevents out-of-bound exception from occurring.

Bug: 19188370
Change-Id: I051dccf7760cb542ea3dc9b0adc9625fa2ad8b1f
parent 26faa0be
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -759,6 +759,8 @@ public final class HdmiRecordSources {
     */
    @SystemApi
    public static boolean checkRecordSource(byte[] recordSource) {
        if (recordSource == null || recordSource.length == 0) return false;

        int recordSourceType = recordSource[0];
        int extraDataSize = recordSource.length - 1;
        switch (recordSourceType) {