diff --git a/components/libc/mmap/posix_mmap.c b/components/libc/mmap/posix_mmap.c index 3d405aad777d02aa5d48cae9ab974e729269462e..a16ace830600c87882ce8c6303c366624dd2e98c 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)