diff options
Diffstat (limited to 'ui/qt5/horizonwizard.cc')
-rw-r--r-- | ui/qt5/horizonwizard.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt5/horizonwizard.cc b/ui/qt5/horizonwizard.cc index d761db1..72ede4f 100644 --- a/ui/qt5/horizonwizard.cc +++ b/ui/qt5/horizonwizard.cc @@ -119,7 +119,7 @@ std::map<std::string, HorizonWizard::NetworkInterface> probe_ifaces(void) { int my_sock = ::socket(AF_INET, SOCK_STREAM, 0); if(my_sock != -1) { memset(&request, 0, sizeof(request)); - memcpy(&request.ifr_name, cifname, strlen(cifname)); + memcpy(&request.ifr_name, cifname, strnlen(cifname, IFNAMSIZ)); errno = 0; if(ioctl(my_sock, SIOCGIFHWADDR, &request) != -1) { char *buf; |