diff options
| author | Bernard Xiong <[email protected]> | 2019-01-21 17:19:07 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2019-01-21 17:19:07 +0800 |
| commit | 97560dd8e208d7b7fc2262cef135a3cbcaeae2eb (patch) | |
| tree | d94418efdb5a848b13b649f08f71e5d1beeabb91 /components/libc | |
| parent | 75061a2712e2cfb02c274b246d70991d0de6a9b5 (diff) | |
[libc] Fix the addr=NULL issue in mmap.
Diffstat (limited to 'components/libc')
| -rw-r--r-- | components/libc/mmap/posix_mmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/libc/mmap/posix_mmap.c b/components/libc/mmap/posix_mmap.c index 3d405aad77..a16ace8306 100644 --- a/components/libc/mmap/posix_mmap.c +++ b/components/libc/mmap/posix_mmap.c @@ -35,7 +35,7 @@ void *mmap(void *addr, size_t length, int prot, int flags, cur = lseek(fd, 0, SEEK_SET); lseek(fd, offset, SEEK_SET); - read_bytes = read(fd, addr, length); + read_bytes = read(fd, mem, length); if (read_bytes != length) { if (addr == RT_NULL) |
