mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
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:
parent
8d79de6e42
commit
73160d9529
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue