View | Details | Raw Unified | Return to bug 203852
Collapse All | Expand All

(-)files/patch-bsd-user_mmap.c (+15 lines)
Line 0 Link Here
1
--- a/bsd-user/mmap.c.orig	2015-12-24 20:32:09.000000000 +0100
2
+++ b/bsd-user/mmap.c	2015-12-29 15:57:47.731358000 +0100
3
@@ -307,8 +307,10 @@ abi_long target_mmap(abi_ulong start, ab
4
     }
5
 
6
     len = TARGET_PAGE_ALIGN(len);
7
-    if (len == 0)
8
-        goto the_end;
9
+    if (len == 0) {
10
+        errno = EINVAL;
11
+        goto fail;
12
+    }
13
     real_start = start & qemu_host_page_mask;
14
     host_offset = offset & qemu_host_page_mask;
15
 

Return to bug 203852