diff --git a/CHANGES b/CHANGES index 8fed6a5..83f0328 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,11 @@ +* Fixed writing beyond array bounds + Release 0.4.3 (Mai 2013) ------------------ +------------------------ * Fixed tunemu compiling issue Release 0.4.2 (Mai 2013) ------------------ +------------------------ * Fixed compilation issue on Linux * Changed the license of tunemu from GPL to BSD * Minor changes diff --git a/src/tun.cpp b/src/tun.cpp index 2d624ea..eef57fa 100644 --- a/src/tun.cpp +++ b/src/tun.cpp @@ -41,7 +41,7 @@ Tun::Tun(const char *device, int mtu) if (device != NULL) { strncpy(this->device, device, VTUN_DEV_LEN); - this->device[VTUN_DEV_LEN] = 0; + this->device[VTUN_DEV_LEN-1] = 0; } else this->device[0] = 0;