Commit 73160d95 authored by Mike Frysinger's avatar Mike Frysinger Committed by Riku Voipio
Browse files

linux-user: fix sizeof handling for getsockopt



Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarRiku Voipio <riku.voipio@nokia.com>
parent 8d79de6e
...@@ -1448,7 +1448,7 @@ static abi_long do_getsockopt(int sockfd, int level, int optname, ...@@ -1448,7 +1448,7 @@ static abi_long do_getsockopt(int sockfd, int level, int optname,
return -TARGET_EFAULT; return -TARGET_EFAULT;
if (len < 0) if (len < 0)
return -TARGET_EINVAL; return -TARGET_EINVAL;
lv = sizeof(int); lv = sizeof(lv);
ret = get_errno(getsockopt(sockfd, level, optname, &val, &lv)); ret = get_errno(getsockopt(sockfd, level, optname, &val, &lv));
if (ret < 0) if (ret < 0)
return ret; return ret;
...@@ -1485,7 +1485,7 @@ static abi_long do_getsockopt(int sockfd, int level, int optname, ...@@ -1485,7 +1485,7 @@ static abi_long do_getsockopt(int sockfd, int level, int optname,
return -TARGET_EFAULT; return -TARGET_EFAULT;
if (len < 0) if (len < 0)
return -TARGET_EINVAL; return -TARGET_EINVAL;
lv = sizeof(int); lv = sizeof(lv);
ret = get_errno(getsockopt(sockfd, level, optname, &val, &lv)); ret = get_errno(getsockopt(sockfd, level, optname, &val, &lv));
if (ret < 0) if (ret < 0)
return ret; return ret;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment