diff options
author | Christian Pointner <equinox@anytun.org> | 2018-05-04 14:57:29 +0200 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2018-05-04 14:57:29 +0200 |
commit | adde0c15b4dc38ed34cefbc854f8071cff7cc61d (patch) | |
tree | be72570422edf74ea1aff15ace1c241f1e1d4625 /src/linux/tunDevice.cpp | |
parent | updated changelog for release (diff) |
fix off-by-one error in tunDevice
Diffstat (limited to 'src/linux/tunDevice.cpp')
-rw-r--r-- | src/linux/tunDevice.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linux/tunDevice.cpp b/src/linux/tunDevice.cpp index e3f5bf4..97a7ede 100644 --- a/src/linux/tunDevice.cpp +++ b/src/linux/tunDevice.cpp @@ -79,7 +79,7 @@ TunDevice::TunDevice(std::string dev_name, std::string dev_type, std::string ifc } if(dev_name != "") { - strncpy(ifr.ifr_name, dev_name.c_str(), IFNAMSIZ); + strncpy(ifr.ifr_name, dev_name.c_str(), IFNAMSIZ-1); } fd_ = ::open(DEFAULT_DEVICE, O_RDWR); |