mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-04-12 02:36:23 +00:00
fixed memcpy overlap (reported by AddressSanitizer) (#80)
* removed unneeded memcpy
This commit is contained in:
@@ -89,7 +89,6 @@ bool PltEncryptMessage(PPLT_CRYPTO_CONTEXT ctx, int algorithm, int flags,
|
||||
size_t encryptedLength = 0;
|
||||
unsigned char * encryptedData = tag;
|
||||
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,
|
||||
encryptedCapacity, &encryptedLength, tagLength) != 0) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user