mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2026-01-12 00:05:50 +08:00
Clear ifname buffer before copying into it.
This commit is contained in:
@@ -465,6 +465,7 @@ class Binder {
|
||||
if (_bindingCount < ZT_BINDER_MAX_BINDINGS) {
|
||||
_bindings[_bindingCount].udpSock = udps;
|
||||
_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());
|
||||
++_bindingCount;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user