fixed memcpy overlap (reported by AddressSanitizer) (#80)
* removed unneeded memcpy
This commit is contained in:
parent
ed7d72c07d
commit
659202c3e5
1 changed files with 0 additions and 1 deletions
|
|
@ -89,7 +89,6 @@ bool PltEncryptMessage(PPLT_CRYPTO_CONTEXT ctx, int algorithm, int flags,
|
||||||
size_t encryptedLength = 0;
|
size_t encryptedLength = 0;
|
||||||
unsigned char * encryptedData = tag;
|
unsigned char * encryptedData = tag;
|
||||||
size_t encryptedCapacity = outLength + tagLength;
|
size_t encryptedCapacity = outLength + tagLength;
|
||||||
memcpy(encryptedData + inputDataLength, tag, tagLength);
|
|
||||||
if (mbedtls_cipher_auth_encrypt_ext(&ctx->ctx, iv, ivLength, NULL, 0, inputData, inputDataLength, encryptedData,
|
if (mbedtls_cipher_auth_encrypt_ext(&ctx->ctx, iv, ivLength, NULL, 0, inputData, inputDataLength, encryptedData,
|
||||||
encryptedCapacity, &encryptedLength, tagLength) != 0) {
|
encryptedCapacity, &encryptedLength, tagLength) != 0) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue