mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-08-22 16:40:26 +00:00
don't copy buffer to ifself
This commit is contained in:
+2
-1
@@ -1036,7 +1036,8 @@ namespace crypto
|
||||
}
|
||||
}
|
||||
// encrypt/decrypt data and add to hash
|
||||
memcpy (buf, msg, msgLen);
|
||||
if (buf != msg)
|
||||
memcpy (buf, msg, msgLen);
|
||||
if (encrypt)
|
||||
{
|
||||
chacha20 (buf, msgLen, nonce, key, 1); // encrypt
|
||||
|
||||
Reference in New Issue
Block a user