summaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-02-10 13:28:08 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-02-10 13:28:08 +0000
commit7bedce8d85a0f1d8b1b2a87618cde4c1e3f53976 (patch)
tree560b09a1c1d938c8be6af0c5f6a9452880db2e99 /linux-user
parentff993638477da242ac94a47c03999d02cf261c25 (diff)
Don't error out on zero-length chunks in writev, as to mimic Linux (Kirill A. Shutemov).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3970 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/syscall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 70aff8457..e8b49ca4a 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1029,7 +1029,7 @@ static abi_long lock_iovec(int type, struct iovec *vec, abi_ulong target_addr,
vec[i].iov_len = tswapl(target_vec[i].iov_len);
if (vec[i].iov_len != 0) {
vec[i].iov_base = lock_user(type, base, vec[i].iov_len, copy);
- if (!vec[i].iov_base)
+ if (!vec[i].iov_base && vec[i].iov_len)
goto fail;
} else {
/* zero length pointer is ignored */