OSDN Git Service
(root)
/
android-x86
/
bionic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22323f9
)
Avoid sign extension in 32-bit mmap.
author
Elliott Hughes
<enh@google.com>
Sat, 21 Dec 2013 02:17:34 +0000
(18:17 -0800)
committer
Elliott Hughes
<enh@google.com>
Sat, 21 Dec 2013 02:17:34 +0000
(18:17 -0800)
Change-Id: I2a77925f62f381a0b34648c3db8154a55dd80c46
libc/bionic/mmap.cpp
patch
|
blob
|
history
diff --git
a/libc/bionic/mmap.cpp
b/libc/bionic/mmap.cpp
index
75bea58
..
84a0f76
100644
(file)
--- a/
libc/bionic/mmap.cpp
+++ b/
libc/bionic/mmap.cpp
@@
-55,5
+55,5
@@
void* mmap64(void* addr, size_t size, int prot, int flags, int fd, off64_t offse
}
void* mmap(void* addr, size_t size, int prot, int flags, int fd, off_t offset) {
- return mmap64(addr, size, prot, flags, fd, static_cast<off64_t>(offset));
+ return mmap64(addr, size, prot, flags, fd, static_cast<off64_t>(offset)
& 0xffffffff
);
}