From cbf2953400665849f3f030c104ff482b7a181241 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: <707b9b97153063374d2530e72c49b1499fc21af9.1367947969.git.minovotn@redhat.com> References: <707b9b97153063374d2530e72c49b1499fc21af9.1367947969.git.minovotn@redhat.com> From: Michal Novotny Date: Tue, 7 May 2013 18:38:21 +0200 Subject: [PATCH 050/114] Revert "qemu-ga: prefer pstrcpy: consistently NUL-terminate ifreq.ifr_name" This reverts commit 74732f21dd184d32f8b68b5539109dc2f44f5a27. Reverting as asked by Laszlo in message <51892739.2030807@redhat.com> because of the ordering issue (most likely) related to supersed testing. Signed-off-by: Michal Novotny --- qga/commands-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 3a2e192..f1b8c5b 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -829,7 +829,7 @@ GuestNetworkInterfaceList *qmp_guest_network_get_interfaces(Error **errp) } memset(&ifr, 0, sizeof(ifr)); - pstrcpy(ifr.ifr_name, IF_NAMESIZE, info->value->name); + strncpy(ifr.ifr_name, info->value->name, IF_NAMESIZE); if (ioctl(sock, SIOCGIFHWADDR, &ifr) == -1) { snprintf(err_msg, sizeof(err_msg), "failed to get MAC addresss of %s: %s", -- 1.7.11.7