File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -417,8 +417,11 @@ LMIC_SecureElement_Default_decodeJoinAccept(
417
417
if (joinFormat != LMIC_SecureElement_JoinFormat_JoinRequest10) {
418
418
return LMIC_SecureElement_Error_InvalidParameter;
419
419
}
420
+ // for API reasons, we have to allow input and output buffers
421
+ // to be different. But we know they'll often be the same, and
422
+ // in our case, we can work in place.
420
423
if (pJoinAcceptClearText != pJoinAcceptBytes) {
421
- os_copyMem(pJoinAcceptClearText, pJoinAcceptClearText , nJoinAcceptBytes);
424
+ os_copyMem(pJoinAcceptClearText, pJoinAcceptBytes , nJoinAcceptBytes);
422
425
}
423
426
aes_encrypt(pJoinAcceptClearText+1, nJoinAcceptBytes-1);
424
427
if( !aes_verifyMic0(pJoinAcceptClearText, nJoinAcceptBytes-4) ) {
You can’t perform that action at this time.
0 commit comments