FreeBSD Bugzilla – Attachment 164821 Details for
Bug 203852
emulators/qemu-user-static: mmap may return NULL instead of MAP_FAILED to indicate error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
return -1 when len is zero
emulators_qemu-sbruno.patch (text/plain), 1014 bytes, created by
Mikael Urankar
on 2015-12-29 15:08:17 UTC
(
hide
)
Description:
return -1 when len is zero
Filename:
MIME Type:
Creator:
Mikael Urankar
Created:
2015-12-29 15:08:17 UTC
Size:
1014 bytes
patch
obsolete
>Index: files/patch-bsd-user_mmap.c >=================================================================== >--- files/patch-bsd-user_mmap.c (nonexistent) >+++ files/patch-bsd-user_mmap.c (working copy) >@@ -0,0 +1,15 @@ >+--- a/bsd-user/mmap.c.orig 2015-12-24 20:32:09.000000000 +0100 >++++ b/bsd-user/mmap.c 2015-12-29 15:57:47.731358000 +0100 >+@@ -307,8 +307,10 @@ abi_long target_mmap(abi_ulong start, ab >+ } >+ >+ len = TARGET_PAGE_ALIGN(len); >+- if (len == 0) >+- goto the_end; >++ if (len == 0) { >++ errno = EINVAL; >++ goto fail; >++ } >+ real_start = start & qemu_host_page_mask; >+ host_offset = offset & qemu_host_page_mask; >+ > >Property changes on: files/patch-bsd-user_mmap.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 203852
: 164821