Setting reserved fields to 0

pull/11/merge
Dennis Schwerdel 2016-11-23 11:27:58 +01:00
parent 3e2fec3216
commit 83d8bcfc1a
1 changed files with 2 additions and 0 deletions

View File

@ -39,6 +39,8 @@ impl TopHeader {
pub fn write_to(&self, data: &mut [u8]) -> usize {
data[0..4].copy_from_slice(&self.magic);
data[4] = self.crypto_method;
data[5] = 0;
data[6] = 0;
data[7] = self.msgtype;
TopHeader::size()
}