diff options
author | Ron Yorston <rmy@pobox.com> | 2021-01-14 13:28:49 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2021-01-14 13:28:49 +0000 |
commit | 89963b524d211e1aec12b72b3725be05ee95c8cf (patch) | |
tree | 48590aef62b7ee7686b7898256f29def8d9c50b9 /modutils/modutils.c | |
parent | 9aa5a829070392c2ac6494d0c4e674c0c2bc7dab (diff) | |
parent | 2b7c1aa92c68524559a2067609d09309d5c09adc (diff) | |
download | busybox-w32-89963b524d211e1aec12b72b3725be05ee95c8cf.tar.gz busybox-w32-89963b524d211e1aec12b72b3725be05ee95c8cf.tar.bz2 busybox-w32-89963b524d211e1aec12b72b3725be05ee95c8cf.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'modutils/modutils.c')
-rw-r--r-- | modutils/modutils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modutils/modutils.c b/modutils/modutils.c index 6f7cd9721..f7ad5e805 100644 --- a/modutils/modutils.c +++ b/modutils/modutils.c | |||
@@ -169,7 +169,7 @@ void* FAST_FUNC try_to_mmap_module(const char *filename, size_t *image_size_p) | |||
169 | /* st.st_size is off_t, we can't just pass it to mmap */ | 169 | /* st.st_size is off_t, we can't just pass it to mmap */ |
170 | if (st.st_size <= *image_size_p) { | 170 | if (st.st_size <= *image_size_p) { |
171 | size_t image_size = st.st_size; | 171 | size_t image_size = st.st_size; |
172 | image = mmap(NULL, image_size, PROT_READ, MAP_PRIVATE, fd, 0); | 172 | image = mmap_read(fd, image_size); |
173 | if (image == MAP_FAILED) { | 173 | if (image == MAP_FAILED) { |
174 | image = NULL; | 174 | image = NULL; |
175 | } else if (*(uint32_t*)image != SWAP_BE32(0x7f454C46)) { | 175 | } else if (*(uint32_t*)image != SWAP_BE32(0x7f454C46)) { |