mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-30 04:37:50 +02:00
Fix any remaning aliasing rules with propper memcpy wrappers
This commit is contained in:
parent
1636187e26
commit
700c53e60a
11 changed files with 140 additions and 94 deletions
|
@ -117,7 +117,7 @@ namespace datagram
|
|||
compressor.MessageEnd();
|
||||
int size = compressor.MaxRetrievable ();
|
||||
uint8_t * buf = msg->GetPayload ();
|
||||
*(uint32_t *)buf = htobe32 (size); // length
|
||||
htobe32buf (buf, size); // length
|
||||
buf += 4;
|
||||
compressor.Get (buf, size);
|
||||
memset (buf + 4, 0, 4); // source and destination are zeroes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue