From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42315 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhHJk-0006xg-L9 for qemu-devel@nongnu.org; Mon, 24 Jan 2011 02:58:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhHJ9-0004Yt-FV for qemu-devel@nongnu.org; Mon, 24 Jan 2011 02:57:52 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:34955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhHJ9-0004Yp-9X for qemu-devel@nongnu.org; Mon, 24 Jan 2011 02:57:51 -0500 From: Mike Frysinger Date: Mon, 24 Jan 2011 02:57:50 -0500 Message-Id: <1295855870-30284-1-git-send-email-vapier@gentoo.org> Subject: [Qemu-devel] [PATCH] linux-user: fix sizeof handling for getsockopt List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Riku Voipio Signed-off-by: Mike Frysinger --- linux-user/syscall.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 499c4d7..6116ab5 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1448,7 +1448,7 @@ static abi_long do_getsockopt(int sockfd, int level, int optname, return -TARGET_EFAULT; if (len < 0) return -TARGET_EINVAL; - lv = sizeof(int); + lv = sizeof(lv); ret = get_errno(getsockopt(sockfd, level, optname, &val, &lv)); if (ret < 0) return ret; @@ -1485,7 +1485,7 @@ static abi_long do_getsockopt(int sockfd, int level, int optname, return -TARGET_EFAULT; if (len < 0) return -TARGET_EINVAL; - lv = sizeof(int); + lv = sizeof(lv); ret = get_errno(getsockopt(sockfd, level, optname, &val, &lv)); if (ret < 0) return ret; -- 1.7.4.rc2