1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Fill address arrays with 0x00

This commit is contained in:
Matias Fontanini
2016-02-07 19:56:41 -08:00
parent 7c1453662f
commit c3861cf54e

View File

@@ -583,6 +583,7 @@ Stream& StreamFollower::find_stream(const stream_id& id) {
StreamFollower::address_type StreamFollower::serialize(IPv4Address address) {
address_type addr;
OutputMemoryStream output(addr.data(), addr.size());
addr.fill(0);
output.write(address);
return addr;
}
@@ -590,6 +591,7 @@ StreamFollower::address_type StreamFollower::serialize(IPv4Address address) {
StreamFollower::address_type StreamFollower::serialize(const IPv6Address& address) {
address_type addr;
OutputMemoryStream output(addr.data(), addr.size());
addr.fill(0);
output.write(address);
return addr;
}