]> git.proxmox.com Git - mirror_qemu.git/blobdiff - qga/commands-posix.c
Merge branch 'trivial-patches' of git://github.com/stefanha/qemu
[mirror_qemu.git] / qga / commands-posix.c
index b0eec7414865351cb44d047423587797f1120a77..726930a909371e1daf3f57458f62e43b5a793def 100644 (file)
@@ -828,7 +828,7 @@ GuestNetworkInterfaceList *qmp_guest_network_get_interfaces(Error **errp)
             }
 
             memset(&ifr, 0, sizeof(ifr));
-            strncpy(ifr.ifr_name,  info->value->name, IF_NAMESIZE);
+            pstrcpy(ifr.ifr_name, IF_NAMESIZE, info->value->name);
             if (ioctl(sock, SIOCGIFHWADDR, &ifr) == -1) {
                 snprintf(err_msg, sizeof(err_msg),
                          "failed to get MAC address of %s: %s",