From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=34843 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmKEr-0002qM-I6 for qemu-devel@nongnu.org; Mon, 07 Feb 2011 01:06:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PmKEq-0001Vx-1t for qemu-devel@nongnu.org; Mon, 07 Feb 2011 01:06:17 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:48123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PmKEp-0001T6-TZ for qemu-devel@nongnu.org; Mon, 07 Feb 2011 01:06:16 -0500 From: Mike Frysinger Date: Mon, 7 Feb 2011 01:05:49 -0500 Message-Id: <1297058757-7611-1-git-send-email-vapier@gentoo.org> Subject: [Qemu-devel] [PATCH 1/9] 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