On 10/28/25 15:20, Peter Maydell wrote:
If you pass sendto() a NULL buffer, this is usually an error
(causing an EFAULT return); however if you pass a 0 length then
we should not try to validate the buffer provided. Instead we
skip the copying of the user data and possible processing
through fd_trans_target_to_host_data, and call the host syscall
with NULL, 0.
(unlock_user() permits a NULL buffer pointer for "do nothing"
so we don't need to special case the unlock code.)
Cc:[email protected]
Resolves:https://gitlab.com/qemu-project/qemu/-/issues/3102
Signed-off-by: Peter Maydell<[email protected]>
---
linux-user/syscall.c | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
Queued, thanks.
r~