Merge "TIF: Check the CEC message length before copying the data" into nyc-dev
am: b6748a2aec
* commit 'b6748a2aec3c4d7e41dccb69eaf29c76780ef4e8':
TIF: Check the CEC message length before copying the data
This commit is contained in:
@@ -330,7 +330,7 @@ static jint nativeSendCecCommand(JNIEnv* env, jclass clazz, jlong controllerPtr,
|
||||
jsize len = env->GetArrayLength(body);
|
||||
message.length = MIN(len, CEC_MESSAGE_BODY_MAX_LENGTH);
|
||||
ScopedByteArrayRO bodyPtr(env, body);
|
||||
std::memcpy(message.body, bodyPtr.get(), len);
|
||||
std::memcpy(message.body, bodyPtr.get(), message.length);
|
||||
|
||||
HdmiCecController* controller =
|
||||
reinterpret_cast<HdmiCecController*>(controllerPtr);
|
||||
|
||||
Reference in New Issue
Block a user