linux-user: fix sizeof handling for getsockopt

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
This commit is contained in:
Mike Frysinger 2011-02-07 01:05:49 -05:00 committed by Riku Voipio
parent 8d79de6e42
commit 73160d9529

View file

@ -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;