CEC: Do null/empty check against the parameter for checkRecordSource()
This prevents out-of-bound exception from occurring. Bug: 19188370 Change-Id: I051dccf7760cb542ea3dc9b0adc9625fa2ad8b1f
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user