From patchwork Mon Feb 7 06:05:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 82175 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6FF2FB70B3 for ; Tue, 8 Feb 2011 09:24:11 +1100 (EST) Received: from localhost ([127.0.0.1]:35879 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmKV9-0000WL-FG for incoming@patchwork.ozlabs.org; Mon, 07 Feb 2011 01:23:07 -0500 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 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id E428D1B4088; Mon, 7 Feb 2011 06:05:47 +0000 (UTC) From: Mike Frysinger To: qemu-devel@nongnu.org, Riku Voipio Date: Mon, 7 Feb 2011 01:05:49 -0500 Message-Id: <1297058757-7611-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.7.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.211.166.183 Cc: Subject: [Qemu-devel] [PATCH 1/9] linux-user: fix sizeof handling for getsockopt X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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;