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

Commit 5273df7d 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

* commit 'b6748a2a':
  TIF: Check the CEC message length before copying the data
parents e87aa618 b6748a2a
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);