* [Qemu-devel] [PATCH] linux-user: fix sizeof handling for getsockopt
@ 2011-01-24 7:57 Mike Frysinger
0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2011-01-24 7:57 UTC (permalink / raw)
To: qemu-devel, Riku Voipio
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-24 7:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-24 7:57 [Qemu-devel] [PATCH] linux-user: fix sizeof handling for getsockopt Mike Frysinger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.