Fixed writing beyond array bounds

This commit is contained in:
Friedrich Schöller 2014-02-07 04:35:00 +01:00
parent a4b81ef64d
commit e6d7f4c043
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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;