Skip to content

Commit 2b54099

Browse files
committed
JNI: zero tmp output buffer from wc_AesCmacGenerate() (F-1959)
1 parent e3f5896 commit 2b54099

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

jni/jni_aescmac.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,8 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_AesCmac_wc_1AesCmacGenerate(
332332
(*env)->SetByteArrayRegion(env, mac_object, 0, copySize,
333333
(const jbyte*) tmp);
334334
}
335+
336+
XMEMSET(tmp, 0, sizeof(tmp));
335337
}
336338

337339
LogStr("wc_AesCmacGenerate(data=%p, dataSz=%d, key=%p, keySz=%d) = %d\n",

0 commit comments

Comments
 (0)