projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84f34b0
)
linux-user: fd_trans_host_to_target_data() must process only received data
author
Laurent Vivier
<laurent@vivier.eu>
Thu, 16 Jun 2016 19:01:36 +0000
(21:01 +0200)
committer
Riku Voipio
<riku.voipio@linaro.org>
Sun, 26 Jun 2016 10:17:22 +0000
(13:17 +0300)
if we process the whole buffer, the netlink helpers can try
to swap invalid data.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
linux-user/syscall.c
patch
|
blob
|
history
diff --git
a/linux-user/syscall.c
b/linux-user/syscall.c
index
33409c0
..
4b0d791
100644
(file)
--- a/
linux-user/syscall.c
+++ b/
linux-user/syscall.c
@@
-2991,7
+2991,7
@@
static abi_long do_sendrecvmsg_locked(int fd, struct target_msghdr *msgp,
len = ret;
if (fd_trans_host_to_target_data(fd)) {
ret = fd_trans_host_to_target_data(fd)(msg.msg_iov->iov_base,
-
msg.msg_iov->iov_
len);
+ len);
} else {
ret = host_to_target_cmsg(msgp, &msg);
}