From c38a4112523bcdb8b3d970ed755dcf47112d45fd Mon Sep 17 00:00:00 2001 From: Kevin Coppock Date: Tue, 22 Feb 2022 11:17:23 -0600 Subject: [PATCH] Use the correct size for attestation challenge when converting to Java --- src/controller/java/CHIPDeviceController-JNI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index cd93723e6dfc29..48fdd52ee82dce 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -599,7 +599,7 @@ JNI_METHOD(jbyteArray, getAttestationChallenge) err = wrapper->Controller()->GetAttestationChallenge(attestationChallenge); SuccessOrExit(err); - err = JniReferences::GetInstance().N2J_ByteArray(env, attestationChallenge.data(), sizeof(attestationChallenge.data()), + err = JniReferences::GetInstance().N2J_ByteArray(env, attestationChallenge.data(), attestationChallenge.size(), attestationChallengeJbytes); SuccessOrExit(err);