Skip to content

Commit 97560dd

Browse files
committed
[libc] Fix the addr=NULL issue in mmap.
1 parent 75061a2 commit 97560dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/libc/mmap/posix_mmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void *mmap(void *addr, size_t length, int prot, int flags,
3535
cur = lseek(fd, 0, SEEK_SET);
3636

3737
lseek(fd, offset, SEEK_SET);
38-
read_bytes = read(fd, addr, length);
38+
read_bytes = read(fd, mem, length);
3939
if (read_bytes != length)
4040
{
4141
if (addr == RT_NULL)

0 commit comments

Comments
 (0)