summaryrefslogtreecommitdiff
path: root/packages/qemu/qemu-0.9.1/writev_fix.patch
blob: e0ed4af9725240dc3dbf3f28965efaa30fabadcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
---
 linux-user/syscall.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: qemu-0.9.1/linux-user/syscall.c
===================================================================
--- qemu-0.9.1.orig/linux-user/syscall.c	2008-02-03 00:00:00.000000000 +0000
+++ qemu-0.9.1/linux-user/syscall.c	2008-02-03 00:00:38.000000000 +0000
@@ -1048,7 +1048,7 @@ static abi_long lock_iovec(int type, str
         base = tswapl(target_vec[i].iov_base);
         vec[i].iov_len = tswapl(target_vec[i].iov_len);
         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;
     }
     unlock_user (target_vec, target_addr, 0);