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

Commit 8554491e authored by Jae Seo's avatar Jae Seo Committed by android-build-merger
Browse files

Merge "TIF: Check the CEC message length before copying the data" into nyc-dev am: b6748a2a

am: 5273df7d

* commit '5273df7d':
  TIF: Check the CEC message length before copying the data
parents 1531a187 5273df7d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);