projects
/
anytun.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'upstream/0.3.7'
[anytun.git]
/
src
/
linux
/
tunDevice.cpp
diff --git
a/src/linux/tunDevice.cpp
b/src/linux/tunDevice.cpp
index
e3f5bf4
..
97a7ede
100644
(file)
--- 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 != "") {
}
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);
}
fd_ = ::open(DEFAULT_DEVICE, O_RDWR);