mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
check for 16 bytes boundary before encryption
This commit is contained in:
parent
4cbc7773ac
commit
607f2d29f2
2 changed files with 5 additions and 4 deletions
|
@ -483,7 +483,7 @@ namespace ntcp
|
|||
*((uint16_t *)sendBuffer) = 0;
|
||||
*((uint32_t *)(sendBuffer + 2)) = htobe32 (time (0));
|
||||
}
|
||||
int rem = (len + 6) % 16;
|
||||
int rem = (len + 6) & 0x0F; // %16
|
||||
int padding = 0;
|
||||
if (rem > 0) padding = 16 - rem;
|
||||
// TODO: fill padding
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue