diff --git a/src/raspberrypi/devices/ctapdriver.cpp b/src/raspberrypi/devices/ctapdriver.cpp index e9332d95..348975d9 100644 --- a/src/raspberrypi/devices/ctapdriver.cpp +++ b/src/raspberrypi/devices/ctapdriver.cpp @@ -66,7 +66,7 @@ static BOOL br_setif(int br_socket_fd, const char* bridgename, const char* ifnam static BOOL ip_link(int fd, const char* ifname, BOOL up) { struct ifreq ifr; int err; - strncpy(ifr.ifr_name, ifname, IFNAMSIZ); + strncpy(ifr.ifr_name, ifname, IFNAMSIZ-1); // Need to save room for null terminator err = ioctl(fd, SIOCGIFFLAGS, &ifr); if (err) { LOGERROR("Error: can't ioctl SIOCGIFFLAGS. Errno: %d %s", errno, strerror(errno)); @@ -262,7 +262,7 @@ BOOL FASTCALL CTapDriver::OpenDump(const Filepath& path) { LOGERROR("Error: can't open pcap file: %s", pcap_geterr(m_pcap)); return FALSE; } - LOGTRACE("%s Opened %s for dumping", __PRETTY_FUNCTION__, path.GetPath()) + LOGTRACE("%s Opened %s for dumping", __PRETTY_FUNCTION__, path.GetPath()); return TRUE; }