mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-22 06:14:02 -07:00
Clear ifname buffer before copying into it.
This commit is contained in:
parent
ab208bb8f9
commit
2f2f864aa8
1 changed files with 1 additions and 0 deletions
|
@ -465,6 +465,7 @@ class Binder {
|
||||||
if (_bindingCount < ZT_BINDER_MAX_BINDINGS) {
|
if (_bindingCount < ZT_BINDER_MAX_BINDINGS) {
|
||||||
_bindings[_bindingCount].udpSock = udps;
|
_bindings[_bindingCount].udpSock = udps;
|
||||||
_bindings[_bindingCount].address = ii->first;
|
_bindings[_bindingCount].address = ii->first;
|
||||||
|
memset(_bindings[_bindingCount].ifname, 0x0, sizeof(_bindings[_bindingCount].ifname));
|
||||||
memcpy(_bindings[_bindingCount].ifname, (char*)ii->second.c_str(), (int)ii->second.length());
|
memcpy(_bindings[_bindingCount].ifname, (char*)ii->second.c_str(), (int)ii->second.length());
|
||||||
++_bindingCount;
|
++_bindingCount;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue